在wpf中更改treeview内滚动条的颜色 [英] change color of scroll bar inside treeview in wpf

查看:118
本文介绍了在wpf中更改treeview内滚动条的颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆