Highlights the gradient origin and the gradient circle

image_pdfimage_print
   
       

<Window x:Class="WpfApplication1.ShapesWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="ShapesWindow" Height="160" Width="400">

    <StackPanel>

    <Canvas ClipToBounds="True" Grid.Row="3" Grid.Column="2" Width="150" Height="150">
      <Rectangle Width="150" Height="150">
        <Rectangle.Fill>
          <RadialGradientBrush GradientOrigin="0.5,0.5" Center="0.1,0.1" RadiusX="0.75" RadiusY="0.75">
            <GradientStop Color="White" Offset="0" />
            <GradientStop Color="#545454" Offset="1" />
          </RadialGradientBrush>
        </Rectangle.Fill>
      </Rectangle>ss
      <Path Fill="Red">
        <Path.Data>
          <EllipseGeometry Center="75,75" RadiusX="2" RadiusY="2" />
        </Path.Data>
      </Path>
      <Path Stroke="Red" StrokeThickness="2">
        <Path.Data>
          <EllipseGeometry Center="15,15" RadiusX="111.5" RadiusY="111.5" />
        </Path.Data>
      </Path>
    </Canvas>

    </StackPanel>
</Window>