<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="http://schemas.panthernet.ru/graphx/">

    <!-- VERTEX CONTROL -->
    <Style TargetType="{x:Type controls:VertexControl}">
        <Setter Property="Background" Value="#FFE3E3E3"/>
        <Setter Property="BorderThickness" Value="15,3,15,3"/>
        <Setter Property="Padding" Value="30,5,30,5"/>
        <Setter Property="BorderBrush" Value="#FF393939"/>

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type controls:VertexControl}">
                    <Border Background="{TemplateBinding Background}" 
                            BorderBrush="{TemplateBinding BorderBrush}"
							CornerRadius="30,30,30,30"
						Padding="{TemplateBinding Padding}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>
                            <ContentPresenter Content="{TemplateBinding Vertex}" />                          
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>

        <!-- VERTEX DRAGGING CONTROL -->
        <Setter Property="controls:DragBehaviour.IsDragEnabled"
                Value="True" />

        <Setter Property="controls:HighlightBehaviour.IsHighlightEnabled" Value="False"/>

        <Style.Triggers>
            <Trigger Property="controls:HighlightBehaviour.Highlighted" Value="True">
                <Setter Property="Background" Value="Gold"/>
                <Setter Property="BorderThickness" Value="7"/>
            </Trigger>
        </Style.Triggers>
    </Style>

    <!-- EDGE CONTROL -->
    <Style TargetType="{x:Type controls:EdgeControl}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type controls:EdgeControl}">
                    <Grid>
                        <Path Stroke="{TemplateBinding Foreground}"
                          StrokeThickness="2" MinWidth="1" MinHeight="1"
                          ToolTip="{TemplateBinding ToolTip}" 
                            x:Name="PART_edgePath"/>
                        <controls:DefaultEdgePointer NeedRotation="true" x:Name="PART_EdgePointerForTarget" >
                            <Path Data="M0,0.5 L1,1 1,0" Fill="Black" Stretch="Uniform" Width="30" Height="30"/>
                        </controls:DefaultEdgePointer>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>

        <Setter Property="MinWidth"
                Value="1" />
        <Setter Property="MinHeight"
                Value="1" />
        <Setter Property="Background"
                Value="Red" />
        <Setter Property="Foreground"
                Value="Black" />
        <Setter Property="Opacity"
                Value="1" />

        <Setter Property="controls:HighlightBehaviour.IsHighlightEnabled" Value="False"/>


        <Style.Triggers>
            <Trigger Property="controls:HighlightBehaviour.Highlighted" Value="True">
                <Setter Property="Foreground" Value="Gold"/>
                <Setter Property="StrokeThickness" Value="5"/>
            </Trigger>
        </Style.Triggers>
    </Style>

</ResourceDictionary>