- Online Barcode Generator
- How To
- Buy Now
CommandBar Floating Strips for WinForms C# Tutorial
The WinForms CommandBar control is a powerful and easy to use user interface control for Windows Forms. This CommandBar control provides large flexibility for developers to customize it. By using the WinForms CommandBar control, developers can rearrange strip elements on different rows elements. By using the CommandBar control, developers can dock the command bar strip element object to the commandbar or float the bar strip element object above the form. Additionally, it supports dragging a CommandBarStripElement from the CommandBar control and hosts and docks it to another.
Basics of the Bar Strip Element
When using the CommandBar Control, developers can use the two properties of EnableDragging and EnableFloating to float the CommandBarStripElement object. The value of the EnableDragging and EnableFloating properties should be set to true at the same time when need to float the CommandBarStripElement. If only one of the two properties be true, the command bar strip element canât be floated. It is possible for users to drag the command bar strip element outside of its control to make it floating and dock it again by moving it over any command bar control.
Events of the Bar Strip Element
The following are some events which offer developers within the Command Bar Control over the floating and docking process.
FloatingStripCreate, this event will be fired if floating a command bar strip. Developers can use the C# code snippet below to prevent the bar strip OptionsStrip from being floating.
FloatingStripCreated, this event will be fired if displaying the form that has been floated. Developers can use the C# Code snippet to set the caption text displayed on the floating form
FloatingStripDocking, this event will be fired if docking a floating strip to the CommandBar control. Developers can use the C# Code snippet to prevent the command bar strip, OptionsStrip, from being docked.
FloatingStripDocked, this event will be fired if docking a floating strip to a CommandBar control. The C# Code snippet below shows how to use the FloatingStripDocked 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