-
Notifications
You must be signed in to change notification settings - Fork 3
MenuItemExtensions
JaykeBird edited this page Feb 21, 2023
·
6 revisions
Back to home | Back to Reference | View raw text
Adds additional methods that can be used to hook into the menu item's IsEnabledChanged event.
flowchart LR
classDef interfaceStyle stroke-dasharray: 5 5;
classDef abstractStyle stroke-width:4px
subgraph SolidShineUi
SolidShineUi.MenuItemExtensions[[MenuItemExtensions]]
end
Returns | Name |
---|---|
void |
AttachEnabledHandler (MenuItem mi, DependencyPropertyChangedEventHandler eh)Attach a handler for the IsEnabledChanged event for a particular MenuItem. |
void |
DetachEnabledHandler (MenuItem mi, DependencyPropertyChangedEventHandler eh)Detach a handler for the IsEnabledChanged event for a particular MenuItem. |
Adds additional methods that can be used to hook into the menu item's IsEnabledChanged event.
public static void AttachEnabledHandler(MenuItem mi, DependencyPropertyChangedEventHandler eh)
Type | Name | Description |
---|---|---|
MenuItem |
mi | The MenuItem to attach to. |
DependencyPropertyChangedEventHandler |
eh | The event handler to use. |
Attach a handler for the IsEnabledChanged event for a particular MenuItem.
When done listening to this event or when deconstructing or cleaning up the UI, call DetachEnabledHandler
to detach this event handler.
public static void DetachEnabledHandler(MenuItem mi, DependencyPropertyChangedEventHandler eh)
Type | Name | Description |
---|---|---|
MenuItem |
mi | The MenuItem to detach from. |
DependencyPropertyChangedEventHandler |
eh | The event handler to detach. |
Detach a handler for the IsEnabledChanged event for a particular MenuItem.
Generated with ModularDoc