in a WPF app, I want to achieve something like this for my groupbox:
The goal is creating a template for the header, just to display something in the left (checkbox + text), and something in the right side (button).
Unfortunately, the only I get is:
what I get http://imageshack.com/a/img513/706/fiaq.png
I would like not to do it programmatically, but everything in the XAML (as cleaner as possible). I mean, using grids, columndefinitions, etc... not dealing with margins that will crash everything when resizing the window.
The XAML I'm using (grid with three columns):
<GroupBox Margin="5">
<GroupBox.Header>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="15"></ColumnDefinition>
<ColumnDefinition Width="100*"></ColumnDefinition>
<ColumnDefinition Width="Auto"></ColumnDefinition>
</Grid.ColumnDefinitions>
<CheckBox Grid.Column="0"></CheckBox>
<TextBlock Grid.Column="1" Margin="5,0,5,0" Text="This is my groupbox"></TextBlock>
<Button Content="Click" FontSize="8" Background="Yellow" Grid.Column="2" Height="16" Width="54"></Button>
</Grid>
</GroupBox.Header>
</GroupBox>
What do you think?