Star サイズのグリッド列内に Silverlight 5 Listbox があり、Listbox DataTemplate 内に別のグリッドがあります。
私がやりたいことは、2 番目の列の DataTemplate グリッドで使用可能なスペースを埋めることです。下の画像に示されているように、含まれているテキストの範囲までのみ塗りつぶされています。
使用可能なスペースをコンテンツで埋めるにはどうすればよいですか?
<ListBox x:Name="TopFaultsListBox" Margin="2" ItemsSource="{Binding TopFaults, Mode=OneWay}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled" SelectedIndex="-1" Background="{x:Null}"
BorderThickness="5" BorderBrush="#FFB1925C" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" VerticalAlignment="Stretch" VerticalContentAlignment="Stretch" >
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Background="#FFE29826">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock x:Name="FailureCount" Foreground="Red" FontSize="40" Grid.Row="0" Grid.RowSpan="3" Text="{Binding FaultCount}" Margin="10"/>
<TextBlock x:Name="AssemblyName" FontSize="20" Text="{Binding AssemblyName}" Grid.Column="1" Grid.Row="1"/>
<TextBlock x:Name="FaultInformation" FontSize="20" Text="{Binding FaultInformation}" Grid.Column="1" Grid.Row="2"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>