<DataGrid AlternationCount="2">
<DataGrid.RowStyle>
<Style TargetType="{x:Type DataGridRow}">
<Style.Triggers>
<Trigger Property="ItemsControl.AlternationIndex"
Value="0">
<Setter Property="Background" Value="Red" />
</Trigger>
<Trigger Property="ItemsControl.AlternationIndex"
Value="1">
<Setter Property="Background" Value="Write" />
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
</DataGrid>

wpf datagrid 隔行变色的更多相关文章

  1. C# WPF DataGrid 隔行变色及内容居中对齐

    C# WPF DataGrid 隔行变色及内容居中对齐. dqzww NET学习0     先看效果: 前台XAML代码: <!--引入样式文件--> <Window.Resourc ...

  2. easyui datagrid 隔行变色

    easyui datagrid  隔行变色 一:实现样图 二:实现代码 $('#dataGrid').datagrid({ rowStyler:function(index,row){ if (row ...

  3. 二、WPF datagrid 行变色

    public void Color(){ DataGridRow row1 = (DataGridRow)this.dgSource.ItemContainerGenerator.ContainerF ...

  4. easyui datagrid隔行变色

    属性striped设置为true,即striped:true. 如果想更改颜色,可以更改easyui.css中的.datagrid-row-alt样式.

  5. WPF DataGrid常用属性记录

    WPF DataGrid常用属性记录 组件常用方法: BeginEdit:使DataGrid进入编辑状态. CancelEdit:取消DataGrid的编辑状态. CollapseRowGroup:闭 ...

  6. WPF DataGrid 样式设置

    隔行换色,鼠标单击,悬浮样式都有,其具体效果如图 1 所示. 图 1 WPF DataGrid 样式设置效果图 其中: 界面设计代码下所示 ? + 查看代码 1 2 3 4 5 6 7 8 9 10 ...

  7. WPF DataGrid 样式分享

    原文:WPF DataGrid 样式分享 隔行换色,鼠标单击,悬浮样式都有 先看效果: 代码: <DataGrid AutoGenerateColumns="False" N ...

  8. jQuery知识点二 实现隔行变色

    <!DOCTYPE html> <html> <head> <meta name="viewport" content="wid ...

  9. css 隔行变色,表单布局

    隔行变色: #list1 li:nth-of-type(odd){ background:#00ccff;}奇数行  #list1 li:nth-of-type(even){ background:# ...

随机推荐

  1. TZOJ 2754 Watering Hole(最小生成树Kruskal)

    描述 Farmer John has decided to bring water to his N (1 <= N <= 300) pastures which are convenie ...

  2. [leetcode]113. Path Sum II路径和(返回路径)

    Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given su ...

  3. 阅读笔记-A Message To Garcia

    A Message To Garcia 主动性:世界会给你以厚报,既有金钱也有荣誉,只要你具备这样一种品质,那就是主动.就是不用别人告诉你,你就能出色的完成工作. 人类社会的最基本的行为法则----互 ...

  4. Paxos Made Simple

    Paxos一致性算法——分布式系统中的经典算法,论文本身也有一段有趣的故事.一致性问题是分布式系统的根本问题之一,在论文中,作者一步步的加强最初一致性问题(2.1节提出的问题)的约束条件,最终导出了一 ...

  5. win, cmd下安装mysql(win真tm难用)

    常用命令: 修改root用户密码 update mysql.user set authentication_string=password('1234qwer') where user='root' ...

  6. How to add libraries to “External Libraries” in WebStorm/PhpStorm/Intellij

    Stack Overflow Questions Developer Jobs Tags Users   Log In Sign Up Join Stack Overflow to learn, sh ...

  7. Unsupported major.minor version 49.0的错误解决

    Unsupported major.minor version 49.0的错误解决 Posted on 2011-01-14 16:49 chinaifne 阅读(15840) 评论(0)  编辑 收 ...

  8. python使用wmi模块获取windows下的系统信息监控系统-乾颐堂

    Python用WMI模块获取Windows系统的硬件信息:硬盘分区.使用情况,内存大小,CPU型号,当前运行的进程,自启动程序及位置,系统的版本等信息. 本文实例讲述了python使用wmi模块获取w ...

  9. Java数据结构和算法(一)散列表

    Java数据结构和算法(一)散列表 数据结构与算法目录(https://www.cnblogs.com/binarylei/p/10115867.html) 散列表(Hash table) 也叫哈希表 ...

  10. $.post 提示错误: Uncaught SyntaxError: Unexpected token :

    $.post("addRecommond",{"productId":productId,"categoryCode":categoryCo ...