I have a nested datagrid on my screen.It does not take the whole space of my window.I have set the height and width of the datagrids. My problem is when that the datagrid size is the same on every screen resolution. How can I make it to adjust based on a resolution? Can I do that somehow with the MinWidth and MaxWidth? or something like that?If I use SizeToContent,it does not maximize the window.
This is how the window should look
This is XAML definition for the grid and main table:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" MinHeight="30"/>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="209*" />
</Grid.ColumnDefinitions>
<DataGrid Name="tabela" Grid.Row="1" Width="1100" Height="700" HorizontalAlignment="Center" IsReadOnly="True" AlternatingRowBackground="#eeeeee" ScrollViewer.CanContentScroll="True" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto" ItemsSource="{Binding}" AutoGenerateColumns="False" RowDetailsVisibilityChanged="tabela_RowDetailsVisibilityChanged" SelectionChanged="tabela_SelectionChanged" >