Clyde Eisenbeis

Clyde Eisenbeis

  • 1.6k
  • 54
  • 6.7k

How do change the Background color on one ListBox item? - Continued #4

Mar 16 2024 7:55 PM

C# wpf --- This is a "continuation" of c-sharpcorner.com/forums/how-do-change-the-background-color-on-one-listbox-item-continued-sharp3.

This code

<ListBox x:Name="gLBxEpidemicSequence">
    <ListBox.ItemContainerStyle>
        <Style TargetType="ListBoxItem">
            <Style.Triggers>
                <Trigger Property="IsSelected" Condition="True">
                    <Setter Property="Background" Value="Blue"/>
                </Trigger>
            </Style.Triggers>
        </Style>
    </ListBox.ItemContainerStyle>
</ListBox>

results in

The property "Value" is missing.	

The property 'Condition' does not exist in XML namespace.

 


Answers (2)