State Persistence in Windows Forms Menu (Menus)
3 Sep 2020 / 1 minute to read
The menu control supports serialization persisting the state of the toolbars and menu items state whenever the application is being used. In this topic the serialization of menu control is discussed.
Enabling state persistence
The menu control by default, enables the serialization and state persistence of the menu items. This can be done via the AutoLoadToolBarPositions
and AutoPersistCustomization
. This can be done either via designer Smart tag options or through code.
The below image shows the serialization is being enabled via the designer
The below code snippet shows the enabling of toolbar state persistence and serialization of menu item state.
this.mainFrameBarManager1.AutoLoadToolBarPositions = true;
this.mainFrameBarManager1.AutoPersistCustomization = true;
Me.mainFrameBarManager1.AutoLoadToolBarPositions = True
Me.mainFrameBarManager1.AutoPersistCustomization = True
Sample Location
The serialization feature is illustrated in this-example.
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page