Eu tenho o seguinte XAML
<Window x:Class="ambiente_teste.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ambiente_teste"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<StackPanel Width="120" Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="120"/>
<RowDefinition Height="20"/>
<RowDefinition Height="30"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Background="#FF38C59F"></StackPanel>
<TextBlock Grid.Row="1" Text="title" Foreground="LightGray" VerticalAlignment="Top" TextAlignment="Center"/>
<!--preencher espaços--> <TextBlock Grid.Row="2" Text="text" Foreground="LightGray" VerticalAlignment="Top" TextAlignment="Center" />
</Grid>
</StackPanel>
</Grid>
</Window>
Como podem perceber, eu tenho espaços sobrando na terceira linha do Grid
. Como eu posso preencher esses espaços com o TextBlock
?
Eu quero fazer semelhante ao Dock.Fill
, do WindowsForms
.