<!-- Copyright © Northwoods Software Corporation, 2008-2026. All Rights Reserved. -->

<UserControl x:Class="Serpentine.Serpentine"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:go="http://schemas.nwoods.com/GoXam"
    xmlns:local="clr-namespace:Serpentine">
  <UserControl.Resources>
    <DataTemplate x:Key="LinkTemplate">
      <go:LinkPanel>
        <go:Link.Route>
          <go:Route Routing="Orthogonal" Corner="10" />
        </go:Link.Route>
        <go:LinkShape go:LinkPanel.IsLinkShape="True" Stroke="Black" StrokeThickness="1" />
        <Polygon Fill="Black" Points="8 4  0 8  2 4  0 0" go:LinkPanel.Index="-1"
                 go:LinkPanel.Alignment="1 0.5" go:LinkPanel.Orientation="Along" />
      </go:LinkPanel>
    </DataTemplate>
  </UserControl.Resources>
  <Grid>
    <go:Diagram x:Name="myDiagram" Padding="10"
                HorizontalContentAlignment="Center"
                VerticalContentAlignment="Center"
                LinkTemplate="{StaticResource LinkTemplate}">
      <go:Diagram.Layout>
        <local:SerpentineLayout Conditions="Standard ViewportSizeChanged" />
      </go:Diagram.Layout>
    </go:Diagram>
  </Grid>
</UserControl>
