Note that there are some explanatory texts on larger screens.

plurals
  1. POChange background color for selected ListBox item
    text
    copied!<p>This is my XAML so far. </p> <pre><code> &lt;ScrollViewer Grid.Column="1" Grid.RowSpan="2"&gt; &lt;ListBox Background="Black" ItemsSource="{Binding Path=ActiveLog}" &gt; &lt;ListBox.ItemTemplate&gt; &lt;DataTemplate&gt; &lt;Grid Background="Black"&gt; &lt;Grid.ColumnDefinitions&gt; &lt;ColumnDefinition Width="200"&gt;&lt;/ColumnDefinition&gt; &lt;ColumnDefinition Width="*"&gt;&lt;/ColumnDefinition&gt; &lt;/Grid.ColumnDefinitions&gt; &lt;Grid.RowDefinitions&gt; &lt;RowDefinition&gt;&lt;/RowDefinition&gt; &lt;RowDefinition&gt;&lt;/RowDefinition&gt; &lt;/Grid.RowDefinitions&gt; &lt;TextBlock Grid.Column="0" Grid.Row="0" Foreground="White"&gt; &lt;TextBlock &gt;Date:&lt;/TextBlock&gt; &lt;TextBlock Text="{Binding Path=LogDate}"/&gt; &lt;/TextBlock&gt; &lt;TextBlock Grid.Column="1" Grid.Row="0" Foreground="White"&gt; &lt;TextBlock &gt;Severity:&lt;/TextBlock&gt; &lt;TextBlock Text="{Binding Path=Severity}"/&gt; &lt;/TextBlock&gt; &lt;TextBlock Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" Foreground="LightGray" Text="{Binding Path=Message}"&gt;&lt;/TextBlock&gt; &lt;/Grid&gt; &lt;/DataTemplate&gt; &lt;/ListBox.ItemTemplate&gt; &lt;ListBox.Template&gt; &lt;ControlTemplate&gt; &lt;StackPanel Background="Black" IsItemsHost="True" &gt; &lt;/StackPanel&gt; &lt;/ControlTemplate&gt; &lt;/ListBox.Template&gt; &lt;/ListBox&gt; &lt;/ScrollViewer&gt; </code></pre> <p>The only problem is that the selected item has a blue box to the right. I assume there is a way to change the selection color, but I can't find it.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload