Articles in this section
Category / Section

How to prevent toolbars to get float in WinForms CommandBar?

1 min read

Toolbar

The DisableFloating property should be set to True to prevent toolbars to get Float. Please refer the below code snippet which illustrates this:

C#

CommandBar cbar = this.mainFrameBarManager1.GetCommandBarManager().GetCommandBarFromBar(this.bar2);
if(cbar != null)
{
   cbar.DisableFloating = true;
}

VB

Dim cbar As CommandBar = Me.mainFrameBarManager1.GetCommandBarManager().GetCommandBarFromBar(Me.bar2)
If Not cbar Is Nothing Then
   cbar.DisableFloating = True
End If

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied