[ACCEPTED]-WPF separator between grid buttons-separator
In case anyone else stumbles across this, easiest 1 solution:
<Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
Have you tried a GridSplitter?
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Height="*" />
<ColumnDefinition Height="Auto" />
<ColumnDefinition Height="100" />
<ColumnDefinition Height="100" />
</Grid.ColumnDefinitions>
<Button/>
<Button/>
<GridSplitter ResizeDirection="Columns" Grid.Column="2" Height="Auto" Width="4" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0"/>
<Button/>
</Grid>
0
I usually use the simple choice to add a 3 column with a fixed width between the buttons You 2 can actually use a different background 1 color or insert an image
You can use Separator if you style it correctly. By 8 default it creates a horizontal line. You 7 have to apply different styling to make 6 it vertical. See this post for how to style 5 it as a vertical line in a WPF Grid:
The 4 discussion also mentions that StatusBar 3 applies some styling to Separator elements, as 2 long as you don't wrap them in StatusBarItems. Perhaps 1 StackPanel does something similar.
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.