WPF separator between grid buttons

Bob picture Bob · Dec 9, 2009 · Viewed 19.8k times · Source

I have a grid with 4 buttons...1 row, 4 columns. I am looking for a way to visually group the two buttons on the left from the two on the right. I was looking for a way to do this with a separator but it doesnt seem to be playing nice with Grid, preferring StackPanel.

Is this the right control?
If so, how does one make the thing separate the columns (populated with buttons in this case)?

Thanks.

Answer

mletterle picture mletterle · Aug 15, 2011

In case anyone else stumbles across this, easiest solution:

<Separator Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />