0
可能重複:
Change selected and unfocused Listbox style to not be grayed out如何禁用灰色重點的TreeView
我只希望保持對樹視圖中的藍色對焦和禁用灰色對焦。這怎麼能在WPF中完成?
可能重複:
Change selected and unfocused Listbox style to not be grayed out如何禁用灰色重點的TreeView
我只希望保持對樹視圖中的藍色對焦和禁用灰色對焦。這怎麼能在WPF中完成?
爲了實現這一點,你需要更換系統控制刷像TreeViewItem的資源如下:
<Style TargetType="TreeViewItem" x:Key="TreeViewItemStyle">
<Style.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Blue>"/>
</Style.Resources>
</Style>