Skip to content

MenuItemExtensions

JaykeBird edited this page Feb 21, 2023 · 6 revisions

Back to home | Back to Reference | View raw text

MenuItemExtensions class

Description

Adds additional methods that can be used to hook into the menu item's IsEnabledChanged event.

Diagram

  flowchart LR
  classDef interfaceStyle stroke-dasharray: 5 5;
  classDef abstractStyle stroke-width:4px
  subgraph SolidShineUi
  SolidShineUi.MenuItemExtensions[[MenuItemExtensions]]
  end
Loading

Members

Methods

Public Static methods

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.

Details

Summary

Adds additional methods that can be used to hook into the menu item's IsEnabledChanged event.

Methods

AttachEnabledHandler

public static void AttachEnabledHandler(MenuItem mi, DependencyPropertyChangedEventHandler eh)
Arguments
Type Name Description
MenuItem mi The MenuItem to attach to.
DependencyPropertyChangedEventHandler eh The event handler to use.
Summary

Attach a handler for the IsEnabledChanged event for a particular MenuItem.

Remarks

When done listening to this event or when deconstructing or cleaning up the UI, call DetachEnabledHandler to detach this event handler.

DetachEnabledHandler

public static void DetachEnabledHandler(MenuItem mi, DependencyPropertyChangedEventHandler eh)
Arguments
Type Name Description
MenuItem mi The MenuItem to detach from.
DependencyPropertyChangedEventHandler eh The event handler to detach.
Summary

Detach a handler for the IsEnabledChanged event for a particular MenuItem.

Generated with ModularDoc

Clone this wiki locally