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.
Unfortunately, activation email could not send to your email. Please try again.

Move Floating Menu Bar

Thread ID:





92088 Dec 17,2009 04:53 PM Dec 18,2009 07:41 AM Windows Forms 1
Tags: Tools
Truman Lackey
Asked On December 17, 2009 04:53 PM

I have a form with menubars on it. I want to be able to set the position of a menubar that is floating.

I have tried the following:

CommandBar cb = bar.Manager.GetBarControl(bar);

cb.FloatBounds = ????;
cb.RowIndex = ???;
cb.RowOffset = ???;
cb.Location = ???;

Setting the above does not move a floating menu bar.

What is the correct way to change the position of a floating bar?

Githanjali S [Syncfusion]
Replied On December 18, 2009 07:41 AM

Hi Truman,

Please follow the below steps:

// Get the CommandBarExt object associated with the Bar
CommandBarExt cmdBarExt = this.mainFrameBarManager1.GetBarControl(this.bar2) as CommandBarExt;

// Get the CommandbarExt's parent CommandDockBar
CommandDockBar cmdDockBar = cmdBarExt.Parent as CommandDockBar;

// Set the CommandDockBar's desired position
cmdDockBar.Location = new Point(0,0);

cmdBarExt.DockState = CommandBarDockState.Float;

Let me know if this works for you.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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.