To define if a method has to have a tick mark (check) in the menu, IsChecked prefix is used before the method name:
<ShellCommand(CanExecute:="Ena_IsWindowActive", IsChecked:="Chk_IsGuidesLocked")> _
Public Sub RifLock()
Page.RifLock(SwitchToggle)
End Sub
The checker function is a custom function, in the above example its code is:
Public Function Chk_IsGuidesLocked() As Boolean
Return Page.IsGridLocked()
End Function
See also
Enabling methods (in menus and keys)