Move Floating Menu Bar

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?

1 Reply

GS Githanjali S Syncfusion Team December 18, 2009 12:41 PM UTC

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.

Regards,
Githanjali

Loader.
Up arrow icon