$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Dock Control for C# WinForms
Allowed Dock States of Dock Control in C# Windows Forms C# projects
Home > WinForms UI Controls > User Manual > Allowed Dock States in C#

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.

toolWindow1.AllowedDockState = AllowedDockState.Docked | AllowedDockState.Floating;
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:

toolWindow1.AllowedDockState = AllowedDockState.Floating;

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

void dock1_FloatingWindowCreate1(object sender, Tettic.WinFormsControls.UI.Docking.FloatingWindowEventArgs e)
{
e.Window.MaximizeBox = true;
e.Window.MinimizeBox = true;
e.Window.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable;
}

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