We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to customize the CommandBar item alignment in CommadBarController?

Platform: WinForms |
Control: CommandBarController

Refer to the following steps for CommandBar items alignment.

  1. Command Bar is not a container type of control and it allows you to rearrange the controls in desired position.
  2. You have to add the desired controls as Panel child controls.
  3. Then add them as CommandBar control child.

The following code example is to demonstrate the same.

C#

//Adding panel1 as its child component
this.commandBarAddress.Controls.Add(this.panel1);
//Aadding child items to panel
this.panel1.Controls.Add(this.buttonAdv1);
//Alignment can be set by using dock property or can place the control as required
this.buttonAdv1.Dock = System.Windows.Forms.DockStyle.Right;

VB

'Adding panel1 as its child component
Me.commandBarAddress.Controls.Add(Me.panel1)
'Adding child items to panel
Me.panel1.Controls.Add(Me.buttonAdv1)
'Alignment can be set by using dock property or can place the control as required
Me.buttonAdv1.Dock = System.Windows.Forms.DockStyle.Right

Sample

http://www.syncfusion.com/downloads/support/directtrac/general/Commadbar-632032339.zip

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile