如何更改datagridin silverlight标题的颜色? [英] how to change the color of header of a datagridin silverlight?

查看:89
本文介绍了如何更改datagridin silverlight标题的颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以告诉我如何更改Silverlight DataGrid的标题颜色吗?我找不到更改标题背景的属性,但是我知道它是一个可样式化的项目,因此必须有某种机制-鉴于它意味着是一个无外观的控件.
标头的前景色已更改...但背景色保持不变..

Could anybody tell me how I change the header colour of the Silverlight DataGrid? I cannot find a property to change the header background, but I know that it is a stylable item so there must be some mechanism - given that it is meant to be a lookless control.
Fpreground of header is changed... But backcolor remains the same..

推荐答案

您需要为模板重新设置ColumnHeaderStyle的样式.我建议使用模板浏览器 [
You need to restyle the ColumnHeaderStyle for the template. I''d recommend using template browser[^] to extract the underlying template, and then modify the bits you need.


使用Expression Blend设置数据网格标题的样式.
Use Expression Blend to style your datagrid header.


这篇关于如何更改datagridin silverlight标题的颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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