In a TreeListBoxItem how can I Override a specific brush define in the control template?

Grids for WPF Forum

Posted 5 months ago by Eyal Lefler
Version: 23.1.4
Avatar

Hi,

I'm using a TreeListBox, with a simple datatemplate (an image an a textBlock).

When the user click on a item in the tree and then select a different area in the application (the tree lost the focus)

the selected tree item bacground becom a littel gray (using snoop i can see it's the ElementChrome.Background).

My problem is that the panel behind the TreeListBox have the same color and the selected item is no longer distingwish from all the other items.

so, How can i override just that color?

when the item is selected and not in foucos.

Thank you.

Comments (1)

Posted 5 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

The TreeListBoxItem backgrounds should show up ok unless you changed the TreeListBox.Background brush.  If you did change that, then this documentation topic tells how to override theme brush resources.  TreeListBoxItem uses the ListItemBackgroundSelectedNormalBrushKey and ListItemBorderSelectedNormalBrushKey brush resources when unfocused and selected.  You can override those per the documentation if you need it to be something else.


Actipro Software Support

The latest build of this product (v24.1.2) was released 24 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.