tags:

views:

172

answers:

1

hello,

i have a problem here, i want to make a multiple toolbar which works just like the toolbar in visual studio.

currently i'm doing it like this

<ToolbarTray>
   <Toolbar>
      <Button x:Name="A"/>
      <Button x:Name="B"/>
      <Button x:Name="C"/>
   </Toolbar>
   <Toolbar>
      <Button x:Name="D"/>
      <Button x:Name="E"/>
      <Button x:Name="F"/>
   </Toolbar>
</ToolbarTray>

now the problem is, i can move each toolbar up and down but i can never move them to the right. you see when we use visual studio we can place each of the toolbar freely in the toolbartray, 1 looks like docked in the left, and the other 1 looks like docked in the right, the other 1 we can placed below the two in the center.

so how can i achieve this?

thanks

+1  A: 

The built-in WPF toolbar doesn't support floating toolbars or user-positioned toolbars. It's quite limited, but personally I think the jury has rendered its verdict on that Office 2003-style toolbar design. It's incredibly frustrating to users when toolbars move around or worse, become detached from their parent.

If you don't mind re-implementing a lot of the layout logic you can probably derive from ToolBarTray and handle mouse events to adjust the layout of the ToolBar controls contained within it.

Having said that, if you want a more full-featured toolbar I would recommend checking out Developer Express's line of WPF components. I didn't see anything on CodePlex that does what you want.

Josh Einstein
i don't really want it to be dockable somewhere else, i just want the toolbar to be freely movable inside the toolbar tray. so the toolbartray is fine to be placed in fixed place but i want the toolbar inside the toolbartray to be freely movable .
dnr3
That's what I assumed you meant. WPF doesn't do that by default so you'd have to derive from ToolBarTray to make the ToolBar's moveable.
Josh Einstein
ahh i see, wew that would be hard then. thanks sir, i guess i'll mark it as the answer
dnr3