Method SetMenu
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
valueDisposableObjectThe new menu to associate with the control. Can be null to remove the current menu.
performLayoutboolA 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.