2012-07-11 3 views
1

내 콤보 상자에서 배경색을 변경하고 싶습니다. 하지만 색상 그라디언트를 유지하고 싶습니다.색 그라디언트로 배경색 변경

enter image description here

나는 효과를 얻을하지 않습니다 아직이 코드를 사용하려고했지만했습니다.

<Setter Property="Background" Value="White"/> <!-- It's only white :(--> 

이 문제를 어떻게 해결할 수 있습니까?

답변

2
<ComboBox> 
    <ComboBox.Background> 
     <LinearGradientBrush EndPoint="0,1"> 
      <GradientStopCollection> 
       <GradientStop Color="Blue" Offset="0.5" /> 
       <GradientStop Color="White" Offset="0.5" /> 
      </GradientStopCollection> 
     </LinearGradientBrush> 
    </ComboBox.Background> 
</ComboBox> 

배경색이 변경됩니다. 원하는 결과를 얻으려면 색상 및 오프셋을 변경하십시오.