Table of Contents

Method BindContextMenuEventsLogger

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

BindContextMenuEventsLogger(ContextMenu?, BindMenuLoggerFlags)

Attaches debug logging handlers to the specified context menu's events.

[Conditional("DEBUG")]
public static void BindContextMenuEventsLogger(ContextMenu? menu, MenuUtils.BindMenuLoggerFlags flags = BindMenuLoggerFlags.Recursive)

Parameters

menu ContextMenu

The ContextMenu instance to which the event handlers will be bound.

flags MenuUtils.BindMenuLoggerFlags

The flags that specify the binding behavior.

Remarks

This method binds handlers to the Opening, Closing, and Closed events to log debug messages when these events occur. The method is only executed in debug builds, as it is marked with the ConditionalAttribute for the "DEBUG" symbol.