WPF如何更改系统控件的默认高亮颜色 (Highlight brush)
来源:互联网 发布:sql union 合并 编辑:程序博客网 时间:2024/09/21 16:23
以前通常是用controlTemplate来实现。 今天发现一个更合理或者简单的方法:
用系统默认颜色的key, 比如
SystemColors.HighlightBrushKey
此资源可以动态引用和改变。而SystemColors.HighlightBrush只能用于静态资源。
example:
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Orange" />
<Button Background="{DynamicResource {x:Static SystemColors.DesktopBrushKey}}" Content="Hello, World!" />
http://msdn.microsoft.com/en-us/library/system.windows.systemcolors.highlightbrushkey.aspx
- WPF如何更改系统控件的默认高亮颜色 (Highlight brush)
- 更改系统高亮显示颜色(highlight color)
- 如何设置SOLR的高亮 (highlight)?
- 如何设置SOLR的高亮 (highlight)?
- 如何设置SOLR的高亮 (highlight)?
- wpf brush赋值颜色
- Flex中如何利用focusIn和focusOut事件对表单中获得焦点的项目进行颜色高亮(highlight)显示的例子
- Flex中如何利用focusIn和focusOut事件,对表单中获得焦点的项目进行颜色高亮(highlight)显示。
- 使用系统默认的dialogue如何更改标题和分割线的颜色
- VS2010 的 高亮引用(Highlight Reference)
- VS2010 的 高亮引用(Highlight Reference)
- VS2010 的 高亮引用(Highlight Reference)设置办法
- 更改placeholder的默认颜色
- Elasticsearch的高亮自定义----highlight
- 改变Discuz!默认的高亮颜色 。。。。
- 如何更改静态文本控件的字体与颜色
- 如何更改Spinner控件右侧的箭头颜色
- wpf 如何更改绑定到控件模版
- 自定义Panel中添加依赖属性需要注意的问题
- Unsharp Mask(USM)锐化算法的的原理及其实现
- TextBlock截断字符显示为....
- DataGrid 支持字符截断显示
- TreeView控件实践
- WPF如何更改系统控件的默认高亮颜色 (Highlight brush)
- Linux系统管理员应该了解的一些I/O统计工具
- 使用TortoiseGit来访问GitHub
- ViewModel中C# Property自动添加OnPropertyChanged处理的小工具, 以及相应Python知识点
- Sublime 实践
- 网站架构资料收集整理
- PythonPath在Windows 下的设置
- Sublime Text: [Decode error - output not utf-8]
- Python 写文件时的Unicode设置