陰影

2013-08-25 51 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