设置ListBox选中项的背景颜色
来源:互联网 发布:善领dsa p57数据升级包 编辑:程序博客网 时间:2024/05/20 04:50
- <Style x:Key="UserItemContainerStyle" TargetType="ListBoxItem">
- <Style.Resources>
- <!--SelectedItem with focus-->
- <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="LightBlue" Opacity=".4"/>
- <!--SelectedItem without focus-->
- <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="LightBlue" Opacity=".4"/>
- </Style.Resources>
- <!-- 设置触发器 -->
- <Style.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter Property="Background" Value="#efefef"/>
- <Setter Property="Foreground" Value="Red"/>
- </Trigger>
- <Trigger Property="IsFocused" Value="true">
- <Setter Property="Background" Value="Coral"/>
- <Setter Property="Foreground" Value="Red"/>
- </Trigger>
- </Style.Triggers>
- </Style>
原文地址:http://blog.csdn.net/leftfist/article/details/27544233
其他方法:https://www.mgenware.com/blog/?p=180
0 0
- 设置 ListBox 选中项的背景颜色
- 设置ListBox选中项的背景颜色
- WPF学习笔记——设置ListBox选中项的背景颜色
- Android 中的ListView选中项的背景颜色怎么设置?
- Android 中的ListView选中项的背景颜色怎么设置?
- Android 中的ListView选中项的背景颜色怎么设置?
- android 中的ListView选中项的背景颜色怎么设置?
- Android 中的ListView选中项的背景颜色怎么设置?
- Android 中设置ListView选中项的背景颜色
- UITableViewCell设置选中背景颜色
- ios 设置UITableView 选中行cell的背景颜色(自定义选中的背景颜色)
- cellForRowAtIndexPath UITableViewCell 选中后的背景颜色设置
- IOS tableView 选中时的背景颜色设置
- eclipse-断点调试-设置断点选中行的背景颜色
- easyui 设置dataGrid选中行的背景颜色
- android中设置ListView的选中的Item的背景颜色(松开后的背景颜色)
- WP--listBox选中项颜色改变
- 设置ListView单击和选中背景颜色
- 基于IAP和Keil MDK的远程升级设计
- [solr]查询权重排序
- 超详细Linux搭建Android开发环境
- 栈的应用——四则表达式
- Cookie基础知识
- 设置ListBox选中项的背景颜色
- JavaScript_异常
- dyld: Library not loaded
- git 服务搭建 windows
- 【Visual Studio】Stopwatch类计算程序运行所需时间
- MySQL 存储表情字符
- RXJAVA响应式编程
- 在自己开发的软件中用到的图标
- Centos下supervisor配置