WPF数据网格的ScrollBar样式化 [英] Styling ScrollBar of WPF datagrid

查看:169
本文介绍了WPF数据网格的ScrollBar样式化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,
有谁知道如何设置wpf datagrid滚动条的样式.我看到的文章通常都具有滚动条样式,但是我不知道如何为wpf datagrid进行操作.

谢谢,

Vsaratkar

Hi

Does anyOne know how to style scrollbar of wpf datagrid. I saw articles styling scrollbars in general, but I don''t know how to do it for wpf datagrid.

Thanks,

Vsaratkar

推荐答案

您也可以在以下示例中使用滚动条模板,例如
ScrollBar ControlTemplate示例 [ ^ ],并
将其正确放置在DataGrid的资源中(或资源在数据网格上方"的任何位置.
如果样式没有键,则DataGrid将显示自动在其
滚动条上使用它.

You can also take a scrollbar template like the example at
ScrollBar ControlTemplate Example[^] and put it
right in the DataGrid''s resources (or any place in the resources "above" the datagrid.
If the style doesn''t have a key then the DataGrid will automagically use it on its
scrollbars.


这篇关于WPF数据网格的ScrollBar样式化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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