<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:loc="clr-namespace:DependencyPropertyExample"
    >

    <Style TargetType="{x:Type loc:ControlWithNamedParts}">
        <Setter Property="Template">
            <Setter.Value>
              
              <!-- Example 18-18. Control template with named parts -->

              <ControlTemplate TargetType="{x:Type loc:ControlWithNamedParts}">
                <Grid Width="80" Height="100">
                  <Ellipse Fill="Black" Stroke="Gray" StrokeThickness="3" Margin="0,20,0,0" />
                  <ContentControl x:Name="PART_Body"
                                  Foreground="White" HorizontalAlignment="Center"
                                  VerticalAlignment="Center" Margin="0,15,0,0" />
                  <Line x:Name="PART_Fuse"
                        Stroke="Blue" StrokeThickness="3" X1="55" Y1="40" X2="75" Y2="5" />
                </Grid>
              </ControlTemplate>


              <!-- End of Example 18-18. -->
              
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
