tags:

views:

20

answers:

1

I've got two Wpf ToolBars in a single ToolBarTray. How to make them fit on two rows?

I noticed users can move them at run-time. Is there a way to get the same behavior at design-time without using two ToolBarTrays ?



To sumarize, at startup, I want this:

alt text

instead of that:

alt text

Thanks

+2  A: 

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>
Zamboni