<Window x:Class="SvgExportIssues.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:diag="http://mindfusion.eu/diagramming/wpf"
        mc:Ignorable="d"
        Title="MindFusion.Diagramming Sample: Anchor Points"
	    Width="1024" Height="768">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition Width="200" />
        </Grid.ColumnDefinitions>

        <ScrollViewer HorizontalScrollBarVisibility="Auto" Focusable="False">
            <diag:Diagram Name="diagram" 
             NodeCreated="diagram_NodeCreated"
             SnapToAnchor="OnCreateOrModify"
             SelectAfterCreate="False"
             AllowLinksRepeat="False"
             LinkShape="Cascading"
             ShapeHandlesStyle="DashFrame"
             AlignToGrid="False"
             BackBrush="White"
             HorizontalAlignment="Stretch"
             VerticalAlignment="Stretch"
             LinkSegments="3"
					   RouteLinks="True"
					   AutoSnapLinks="True"
					   AutoSnapDistance="10">
            </diag:Diagram>
        </ScrollViewer>

        <StackPanel Grid.Column="1" Orientation="Vertical" Margin="10">
            <Border BorderBrush="Gray" BorderThickness="1" Margin="0,0,0,10">
                <TextBlock TextWrapping="Wrap" Margin="2">This sample shows how to define custom anchor-point patterns and assign them to nodes. There are also several predefined anchor patterns to choose from. One of them, DecisionBox, is used with the decision nodes in the sample diagram on the left. Link several nodes with arrows to get an idea how anchor points work.</TextBlock>
            </Border>
            <GroupBox Header="Box shape" Margin="0,0,0,10">
                <StackPanel Orientation="Vertical" Margin="2">
                    <RadioButton Margin="0,0,0,2" Name="radioButton1" Checked="radioButton1_Checked">Node</RadioButton>
                    <RadioButton Name="radioButton2" Checked="radioButton2_Checked">Decision</RadioButton>
                </StackPanel>
            </GroupBox>
            <Button Name="loadXmlBtn" Click="OnLoadClick" Margin="2">Load XML</Button>
            <Button Name="saveXmlBtn" Click="OnSaveClick" Margin="2">Save SVG</Button>
        </StackPanel>

    </Grid>
</Window>
