xaml - wpf datagrid alternate row coloring -


i have tried method.. without luck..

 <style targettype="{x:type datagridrow}">   <style.triggers>       <trigger property="itemscontrol.alternationindex" value="0">           <setter property="foreground" value="red" />      </trigger>   </style.triggers> </style> 

is there way row index? have tried

<datatrigger binding="{binding alternationindex}" value="0">     <setter property="foreground" value="green"></setter> </datatrigger> 

unless done, have set alternationcount property of datagrid:

<datagrid alternationcount="2"           ... /> 

you should additionally check whether foreground property used control in datagridrow. try setting background property test alternation stuff.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -