Table of Contents

Method SetMenu

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

SetMenu(DisposableObject?, bool)

Sets the menu for the control and optionally performs a layout update.

public virtual void SetMenu(DisposableObject? value, bool performLayout = true)

Parameters

value DisposableObject

The new menu to associate with the control. Can be null to remove the current menu.

performLayout bool

A value indicating whether to perform a layout update after setting the menu. The default value is true.

Remarks

If the control is in a disposing or disposed state, this method does nothing. If the specified menu is the same as the current menu, it is assigned anyway, allowing to rebuild the native menu.