阴影

2013-08-25 54 views
0

我想在一个WPF DataGrid行背景色阴影
我想什么是设置DataGrid行的风格,但我真的有点被困在那里
我可以设置背景属性为一些颜色甚至是渐变色,但我似乎无法对颜色
我试图让该行的背景不太平坦阴影

<Style TargetType="DataGridRow"> 
    <Setter Property="Background" Value="....." /> 
+0

你能不能给我们要完成什么照片? –

+0

像这样的东西:[链接](http://i.stack.imgur.com/f9ZVH.png)但只有网格行,我的行颜色是绑定属性,所以我需要阴影放在任何颜色的行有 –

回答

1

阴影也能正常工作:

<DataGrid.RowStyle> 
    <Style TargetType="DataGridRow"> 
     <Setter Property="Background"> 
      <Setter.Value> 
       <SolidColorBrush Color="{Binding color}"/> 
      </Setter.Value> 
     </Setter> 
     <Setter Property="Effect"> 
      <Setter.Value> 
       <DropShadowEffect BlurRadius="50" Color="{Binding color}"/> 
      </Setter.Value> 
     </Setter> 
    </Style> 
</DataGrid.RowStyle> 

虽然我不知道你在做什么,从各行的阴影彼此混合,模糊行文字: -/

enter image description here