Method BindMenuItemEventsLogger
BindMenuItemEventsLogger(MenuItem?, BindMenuLoggerFlags)
Attaches event handlers to the specified MenuItem to log its Opened, Closed, and Highlighted events.
[Conditional("DEBUG")]
public static void BindMenuItemEventsLogger(MenuItem? menuItem, MenuUtils.BindMenuLoggerFlags flags = BindMenuLoggerFlags.Recursive)
Parameters
menuItemMenuItemThe MenuItem to which the event handlers will be bound. Cannot be null.
flagsMenuUtils.BindMenuLoggerFlagsThe flags that specify the binding behavior.
Remarks
This method ensures that the MenuItem logs debug messages whenever it is opened, closed, or highlighted.