■ RadialGradientBrush 클래스의 GradientOrigin 속성을 사용하는 방법을 보여준다.
▶ GradientOrigin=”0.25 0.25″ (XAML)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
<Ellipse Width="150" Height="150" StrokeThickness="2" Stroke="Black"> <Ellipse.Fill> <RadialGradientBrush RadiusX="0.5" RadiusY="0.5" Center="0.5 0.5" GradientOrigin="0.25 0.25"> <GradientStop Offset="0" Color="White" /> <GradientStop Offset="1" Color="Gray" /> </RadialGradientBrush> </Ellipse.Fill> </Ellipse> |
▶ GradientOrigin=”0.75 0.25″ (XAML)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
<Ellipse Width="150" Height="150" StrokeThickness="2" Stroke="Black"> <Ellipse.Fill> <RadialGradientBrush RadiusX="0.5" RadiusY="0.5" Center="0.5 0.5" GradientOrigin="0.75 0.25"> <GradientStop Offset="0" Color="White" /> <GradientStop Offset="1" Color="Gray" /> </RadialGradientBrush> </Ellipse.Fill> </Ellipse> |
▶ GradientOrigin=”0.25 0.75″ (XAML)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
<Ellipse Margin="10" Width="150" Height="150" StrokeThickness="2" Stroke="Black"> <Ellipse.Fill> <RadialGradientBrush RadiusX="0.5" RadiusY="0.5" Center="0.5 0.5" GradientOrigin="0.25 0.75"> <GradientStop Offset="0" Color="White" /> <GradientStop Offset="1" Color="Gray" /> </RadialGradientBrush> </Ellipse.Fill> </Ellipse> |
▶ GradientOrigin=”0.75 0.75″ (XAML)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
<Ellipse Margin="10" Width="150" Height="150" StrokeThickness="2" Stroke="Black"> <Ellipse.Fill> <RadialGradientBrush RadiusX="0.5" RadiusY="0.5" Center="0.5 0.5" GradientOrigin="0.75 0.75"> <GradientStop Offset="0" Color="White" /> <GradientStop Offset="1" Color="Gray" /> </RadialGradientBrush> </Ellipse.Fill> </Ellipse> |