How to set width to 100% in WPF
Is there any way how to tell component in WPF to take 100% of available space? Like width: 100%; in CSS I've got this XAML, and I don't know how to force Grid to take 100% width. <ListBox Name="lstConnections"> <ListBox.ItemTemplate> <DataTemplate> <Grid Background="LightPink"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <TextBlock Grid.Row="0" Grid.Column="0" Text="{Binding Path=User}" Margin="4"></TextBlock>