- Online Barcode Generator
- How To
- Buy Now
Float Windows and Allow Dock States in C# WinForms
In this tutorial, we will learn how to use the AllowedDockState property. This is a property that allows users control the available dock states per ToolWindow. This property has a few options that can be used together with bitwise operations.
The C# code snippet below will automatically will remove the caption buttons or closed for an unnecessary state.
In addition, developers can also disable the unnecessary menu items from the context menu. The following C# code is able to disable the Floating option:
How to Customize Float Windows
When using the Dock Control in Windows Forms project, we can float Windows, which offers a helpful way to rearrange pieces of content on the screen. The default value of the Floating Windows only appears with their close button enabled, and on top of the Dock Control that manages them. The following is a tutorial that shows how to change the behavior. In the tutorial, developers need to handle the FloatingWindowCreated event that will be fired when the end user drag a ToolWindow and float it.
How to Enable Minimize and Maximize Buttons
If developers need to enable the Maximize and Minimize buttons when floating a Window, they can use the C# code below to handle the FloatingWindowCreate event and configure the properties of MinimizeBox, MaximizeBox and FormBorderStyle of the FloatingWindow
How to Place FloatingWindow under Main Form
When developers need put the FloatingWindow under the main form rather than on the top, where the Dock manager is included, they can extend the FloatingWindow class and use an instance of the extended type.
Then, developers need to pass a custom FloatingWindow instance to the
How to Set FloatingWindow Theme
It is because that the FloatingWindow is a descendant class of Dock WinForm, developers can change the FloatingWindow theme by changing the ThemeName property in the FloatingWindowCreated event
UI Controlsfor Windows Forms.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls