Created
February 24, 2013 21:49
-
-
Save cabrel/5025830 to your computer and use it in GitHub Desktop.
WPF ToolBar Content Alignment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ToolBar> | |
<ToolBar.Resources> | |
<Style TargetType="{x:Type ToolBarPanel}"> | |
<Setter Property="Orientation" Value="Vertical"/> | |
</Style> | |
</ToolBar.Resources> | |
<!-- This is the downside of this solution: | |
You have to set the height at some level (once) | |
or you will end up with controls forcing | |
the toolbar to auto-size until it fills up it's parent --> | |
<DockPanel Height="48"> | |
<Button Name="ButtonOne" Click=ButtonOne_Click" /> | |
<Button Name="ButtonTwo" Click=ButtonTwo_Click" /> | |
<Button Name="ButtonThree" Click="ButtonThree_Click" HorizontalAlignment="Right" /> | |
</DockPanel> | |
</ToolBar> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment