.net - WPF ListView Inactive Selection Color and element font color -


I am able to set ListView disable selection color

I used the solution described in the following question

I need to change the font color of the selected passive element, is this the easiest way to accomplish this?

Thank you

Unfortunately, you can change the SystemColors.ControlTextBrushKey Can not be used because it applies when the item is not selected or when it is selected but disabled (your question reads as if you are interested only later). However, you can:

  & lt; List box ... & gt; & Lt; ListBox.Resources & gt; & Lt ;! - This background color changes, when the item is selected but passive - & gt; & Lt; Solid Coiler Brush X: Key = "{x: Static System Kollger. ControlBridgeKey}" & gt; Red & lt; / SolidColorBrush & gt; & Lt; /ListBox.Resources> & Lt; ListBox.ItemContainerStyle & gt; & Lt; Style & gt; & Lt; Style.Triggers & gt; & Lt ;! - This item optimizes the color of the foreground when selected, but the idle - & gt; & Lt; Trigger Property = "Selector. Selected" value = "true" & gt; & Lt; Setter property = "TextElement.Foreground" value = "blue" /> & Lt; / Catalyst & gt; & Lt; /Style.Triggers> & Lt; / Style & gt; & Lt; /ListBox.ItemContainerStyle> & Lt; / ListBox & gt;  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -