DEV GridControl.TableView FocusedRow选中行背景颜色
上次修改了TableView.RowStyle,导致了一个问题:覆盖了GridControl默认的选中行颜色。
于是需要重写选中行的颜色。
刚开始的想法是:
<dxg:TableView>
<dxg:TableView.RowStyle>
<Style TargetType="{x:Type dxg:GridRowContent}">
<Style.Triggers>
<Trigger Property="IsFocused" Value="True">
<Setter Property="Background" Value="Gray" />
</Trigger>
</Style.Triggers>
</Style>
</dxg:TableView.RowStyle>
</dxg:TableView>
发现实现不了……后来去DEV官网求助,原来思路是对的,但是Property不正确,不是IsFocused,而是dxg:GridViewBase.IsFocusedRow.
<dxg:TableView>
<dxg:TableView.RowStyle>
<Style TargetType="{x:Type dxg:GridRowContent}">
<Style.Triggers>
<Trigger Property="dxg:GridViewBase.IsFocusedRow" Value="True">
<Setter Property="Background" Value="Gray" />
</Trigger>
</Style.Triggers>
</Style>
</dxg:TableView.RowStyle>
</dxg:TableView>
这是低于14.1版本用的,14.1及以后的版本,使用以下:
<dxg:TableView>
<dxg:TableView.RowStyle>
<Style TargetType="{x:Type dxg:RowControl}">
<Style.Triggers>
<Trigger Property="dxg:GridViewBase.IsFocusedRow" Value="True">
<Setter Property="Background" Value="Gray" />
</Trigger>
</Style.Triggers>
</Style>
</dxg:TableView.RowStyle>
</dxg:TableView>
DEV GridControl.TableView FocusedRow选中行背景颜色的更多相关文章
- listview改变选中行字体颜色
[android]listview改变选中行字体颜色 目标:选中item,其字体设置为#3197FF,未选中的,其字体为#FFFFFF 与listvew设置选中行item背景图片一样,使用select ...
- 【android】listview改变选中行背景图片
[android]listview改变选中行背景图片 目标:当item选中时,改变其背景图片.效果图如下: 直接在listview的xml文件中使用listselector: 1 2 3 4 5 6 ...
- tableView和tableViewCell的背景颜色问题
当在tableView中添加cell数据时,我们会发现原本设置的tableView的背景颜色不见了,这是因为加载cell数据时,tableView的背景颜色被cell数据遮盖住了,此时,可以通过设置c ...
- DEV GridControl TableView隔行换色/奇偶行换色
GridControl中的TableView“奇偶行换色”这件事情纠结了我好几天,虽然已经是上个月的事情,好歹记录一下吧,万一有谁要用到呢. GridControl是长这个样子的, <dxg:G ...
- DEV:GridControl 筛选复选框 Checked Dropdown更改数据源
用了DEV网站给的图: 起初,我并不知道这个圈起来的部分叫做Filter Dropdown,这个List里面的数据默认与GridControl中的数据保持一致的. 现在需要对这个FilterDropd ...
- WPF 改变Datagrid的选中行的颜色
主要通过设置DataGrid的RowStyle和CellStyle即可. <Style TargetType="DataGridRow" x:Key="gridRo ...
- WPF DataGrid ListView 等等 改变 选中行 颜色;以及 不变的原因
WPF中改变选中行的颜色是很简单的,就是用触发器:比如:以DataGrid为例: DataGrid.RowStyle Style TargetType= DataGridRow SetterPrope ...
- 在Dev GridControl中添加颜色可变的ProgressBar z
在使用DevExpress,GridControl自带的ProgressBarControl的时候 由于无法通过BackColor/ForeColor来改变进度条的颜色所以很多特效是实现不了的.如下面 ...
- Eclipse背景颜色修改
改变背景颜色(黑底背景的设置) windows->Preferences->General->Editor->Text Editors windows->Preferen ...
随机推荐
- select2插件的使用
<select id="prd_tech_for_load" class="selectable" style="width:180px;&qu ...
- c/c++ 数据结构 链表插入数据代码(二)
如果参数传递不使用使用指针的指针,也不使用引用. #include <stdio.h> #include <stdlib.h> typedef struct LNode{ in ...
- python IDE
提供给开发者 10 款最好的 Python IDE http://www.oschina.net/news/57468/best-python-ide-for-developers vim windo ...
- 14. 星际争霸之php设计模式--状态模式
题记==============================================================================本php设计模式专辑来源于博客(jymo ...
- C语言回顾-运算符和循环
1.运算符 连接操作数,构成表达式 按功能划分: 1)算术运算符 + - * / % 2)关系运算符 3)逻辑运算符 4)按位运算符 按操作数划分: 1)单目运算符 2)双目运算符 3)三目运算符 ...
- Windows10 如何删掉内置的 skype ?
打开开始菜单,输入“PowerShell”并回车: 运行“Get-AppxPackage -User username”命令( username 请替换成当前实际用户名),此时会显示所有已安装的应用程 ...
- debuggee python
my_debugger_defines.py #encoding:utf-8 from ctypes import * from sys import version as py_ver # In p ...
- postgresql流复制配置
一.配置环境: 示例环境 主机名 IP 角色 系统版本 数据目录 pg版本 db1 192.168.128.128 主库 RedHat5.3 /app/postgreSQL/data 9.1.7 db ...
- objective C 学习之02
1. 函数 -(void) HelloWorld:(BOOL)ishelloworld{ //干点啥 } 前面带有减号(-) 的方法为实例方法,必须使用类的实例才可以调用的.对应的有+号, 代表是类的 ...
- WebRequest使用
// 待请求的地址 string url = "http://www.cnblogs.com"; // 创建 WebRequest 对象,WebRequest 是抽象类,定义了请求 ...