文字列の配列にバインドされたリストボックスがあります。リストボックスには、配列内の文字列のテキストを含むテキストブロックが含まれています。それらの1つの前景を変更したい(どれが異なる場合があります):
<ListBox x:Name="listBox" ItemsSource="{Binding Options}" ScrollViewer.VerticalScrollBarVisibility="Hidden" Width="400" Height="500" Margin="0,200,0,0" HorizontalAlignment="Center" HorizontalContentAlignment="Center" SelectionChanged="ListBox_SelectionChanged" Loaded="listBox_Loaded">
<ListBox.ItemTemplate>
<DataTemplate>
<ListBoxItem>
<Grid Height="75" Width="400" HorizontalAlignment="Center" >
<TextBlock HorizontalAlignment="Center" Text="{Binding}" Style="{StaticResource SortingOptions}" />
</Grid>
</ListBoxItem>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
テキストブロックを手に入れることができないように見えるので、右側の前景を変更できます。誰かが私がこれを達成する方法を知っていますか?ありがとう