<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:controls="clr-namespace:AIStudio.Wpf.Mind.Controls">

    <Style x:Key="LinkControlStyle" TargetType="{x:Type controls:LinkControl}">
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Foreground" Value="Gray"/>
        <Setter Property="Margin" Value="3" />
        <Setter Property="Padding" Value="1" />
        <Setter Property="Width" Value="15" />
        <Setter Property="Height" Value="8" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type controls:LinkControl}">
                    <Border Background="{TemplateBinding Background}"
                          BorderThickness="{TemplateBinding BorderThickness}"
                          BorderBrush="{TemplateBinding BorderBrush}"
                          Padding="{TemplateBinding Padding}"
                          SnapsToDevicePixels="true">
                        <TextBlock Background="{TemplateBinding Background}"
                           HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                           VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                           SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                          <Hyperlink
                            x:Name="PART_InnerHyperlink"
                                NavigateUri="{Binding RelativeSource= {RelativeSource TemplatedParent}, Path=Url}"
                                TextDecorations ="None"
                                Command="{Binding RelativeSource= {RelativeSource TemplatedParent}, Path=Command}"
                                CommandParameter="{Binding RelativeSource= {RelativeSource TemplatedParent}, Path=CommandParameter}"
                                CommandTarget="{Binding RelativeSource= {RelativeSource TemplatedParent}, Path=CommandTarget}">
                              <Path Stretch="Uniform" Fill="{Binding RelativeSource= {RelativeSource TemplatedParent}, Path=Foreground}" 
                                    Data="M48 226Q48 191 72 168 95 144 130 144L165 144Q191 144 211 157 231 170 240 192L129 192Q115 192 106 202 96 211 96 225L96 287Q96 301 106 311 115 320 129 320L240 320Q231 342 211 355 191 368 165 368L130 368Q95 368 72 345 48 321 48 286L48 226ZM464 286Q464 321 441 345 417 368 382 368L347 368Q321 368 301 355 281 342 272 320L383 320Q397 320 407 311 416 301 416 287L416 225Q416 211 407 202 397 192 383 192L272 192Q281 170 301 157 321 144 347 144L382 144Q417 144 441 168 464 191 464 226L464 286ZM144 232L368 232 368 280 144 280 144 232Z"></Path>
                          </Hyperlink>
                        </TextBlock>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" Value="Yellow"/>
                        </Trigger>
                        <Trigger SourceName="PART_InnerHyperlink" Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type controls:LinkControl}" BasedOn="{StaticResource LinkControlStyle}"/>
</ResourceDictionary>
