如何更改treeview中仅选定项目的彩色孩子
如何更改treeview中仅选择的项目的彩色孩子? 我的风格:
<Style Selector="TreeViewItem:selected TextBlock">
<Setter Property="Foreground" Value="White"/>
</Style>
但这适用于节点中的所有儿童treeviewitem。 ScreenShot
How to change color childs of only selected item in TreeView?
My style:
<Style Selector="TreeViewItem:selected TextBlock">
<Setter Property="Foreground" Value="White"/>
</Style>
But this works for all child TreeViewItem in node.
Screenshot
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
默认情况下,有一些刷子用于TreeView。
imainlightTextBrushKey
- 您可以用于前景。righlightbrushkey
- 您可以用于背景。您可以改变前景:
There are brushes that used by default Template for TreeView.
HighlightTextBrushKey
- You can use for foreground.HighlightBrushKey
- You can use for background.You can do to change foreground: