■ RadialGradientBrush 엘리먼트를 사용하는 방법을 보여준다.
▶ 예제 코드 (XAML)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
<Rectangle Width="200" Height="100"> <Rectangle.Fill> <RadialGradientBrush Center="0.5 0.5" RadiusX="0.5" RadiusY="0.5" GradientOrigin="0.5 0.5"> <GradientStop Offset="0.0" Color="Red" /> <GradientStop Offset="0.25" Color="Yellow" /> <GradientStop Offset="0.75" Color="Pink" /> <GradientStop Offset="1.0" Color="White" /> </RadialGradientBrush> </Rectangle.Fill> </Rectangle> |