WPF ToolBar: how to organize toolbars during development

I have two Wpf ToolBars in one ToolBarTray. How to make them suitable for two rows?

I noticed that users can move them at runtime. Is there a way to get the same behavior during development without using two ToolBarTrays tools?



To summarize, at startup I want this:

alt text

instead of this:

alt text

thanks

+4
source share
1 answer

Use Band and BandIndex to control toolbar layout.

<ToolBarTray Background="White"> <ToolBar Band="1" BandIndex="1"> <Button Content="B1"/> <Button Content="B2"/> <Button Content="B3"/> </ToolBar> <ToolBar Band="2" BandIndex="1"> <Button Content="B4"/> <Button Content="B5"/> </ToolBar> <ToolBar Band="2" BandIndex="2"> <Button Content="B6"/> <Button Content="B7"/> </ToolBar> </ToolBarTray> 
+4
source

All Articles