Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

In reference to this other postpost, the ControlBrushKey did not work for me. The InactiveSelectionHighlightBrushKey did, however. Also setting the InactiveSelectionHighlightTextBrushKey got around the changing text color.

My complete solution:

<TreeView.Resources> <!-- Style the inactive selection the same as active --> <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="{DynamicResource {x:Static SystemColors.HighlightColorKey}}" /> <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="{DynamicResource {x:Static SystemColors.HighlightTextColorKey}}"/> </TreeView.Resources> 

In reference to this other post, the ControlBrushKey did not work for me. The InactiveSelectionHighlightBrushKey did, however. Also setting the InactiveSelectionHighlightTextBrushKey got around the changing text color.

My complete solution:

<TreeView.Resources> <!-- Style the inactive selection the same as active --> <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="{DynamicResource {x:Static SystemColors.HighlightColorKey}}" /> <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="{DynamicResource {x:Static SystemColors.HighlightTextColorKey}}"/> </TreeView.Resources> 

In reference to this other post, the ControlBrushKey did not work for me. The InactiveSelectionHighlightBrushKey did, however. Also setting the InactiveSelectionHighlightTextBrushKey got around the changing text color.

My complete solution:

<TreeView.Resources> <!-- Style the inactive selection the same as active --> <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="{DynamicResource {x:Static SystemColors.HighlightColorKey}}" /> <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="{DynamicResource {x:Static SystemColors.HighlightTextColorKey}}"/> </TreeView.Resources> 
Source Link
Mike Richards
  • 1k
  • 3
  • 15
  • 23

In reference to this other post, the ControlBrushKey did not work for me. The InactiveSelectionHighlightBrushKey did, however. Also setting the InactiveSelectionHighlightTextBrushKey got around the changing text color.

My complete solution:

<TreeView.Resources> <!-- Style the inactive selection the same as active --> <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="{DynamicResource {x:Static SystemColors.HighlightColorKey}}" /> <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="{DynamicResource {x:Static SystemColors.HighlightTextColorKey}}"/> </TreeView.Resources>