在wpf中更改treeview内滚动条的颜色 [英] change color of scroll bar inside treeview in wpf
问题描述
我有一个WPF应用程序,它可以在Windows基本主题上正常运行,但是当我将主题更改为Windows 7经典主题时,滚动条颜色会变为蓝色 .
我不想强加任何特定主题到我的应用程序中,因为这会影响我的其他样式和模板.
请指导我如何开始使用wpf.
感谢
Supriya
更改模板,我认为您很有必要超越Windows主题.
但是无论如何.
您需要深入研究scrollviewer并设置其样式.这比人们最初想像的要复杂:
http://sachabarbs.wordpress.com/2008/01/11/styling-a-scrollviewerscrollbar-in-wpf/
I have a WPF application it is working perfectly fine with windows basic theme but when I am changing the theme to windows 7 classic theme,the scroll bar color changes to blue .
I dont want to force any particular theme to my application as it is effecting my other styles and templates.
Kindly guide me how can I do I am new to wpf.
Thanks
Supriya
Change templates and I would think you are rather necessarilly over-riding windows themes.
But anyhow.
You will need to delve into the scrollviewer and style it. This is trickier than one might first imagine:
http://sachabarbs.wordpress.com/2008/01/11/styling-a-scrollviewerscrollbar-in-wpf/
这篇关于在wpf中更改treeview内滚动条的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!