<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:PresentationOptions="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
                    >

  <Style x:Key="ActionLinkButton" TargetType="{x:Type Button}">
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="Focusable" Value="True" />
    <Setter Property="Foreground" Value="{DynamicResource GitHubActionLinkItemBrush}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <TextBlock>
            <Hyperlink Command="{TemplateBinding Command}"
                       CommandParameter="{TemplateBinding CommandParameter}"
                       Foreground="{TemplateBinding Foreground}">
              <Hyperlink.Resources>
                <Style TargetType="{x:Type Hyperlink}">
                  <Style.Triggers>
                    <MultiTrigger>
                      <MultiTrigger.Conditions>
                        <Condition Property="UIElement.IsMouseOver" Value="false" />
                        <Condition Property="IsEnabled" Value="true" />
                      </MultiTrigger.Conditions>
                      <MultiTrigger.Setters>
                        <Setter Property="TextDecorations" Value="None" />
                        <Setter Property="FrameworkElement.Cursor" Value="None" />
                      </MultiTrigger.Setters>
                    </MultiTrigger>
                    <MultiTrigger>
                      <MultiTrigger.Conditions>
                        <Condition Property="IsMouseOver" Value="true" />
                        <Condition Property="IsEnabled" Value="true" />
                      </MultiTrigger.Conditions>
                      <MultiTrigger.Setters>
                        <Setter Property="TextDecorations" Value="Underline" />
                        <Setter Property="FrameworkElement.Cursor" Value="Hand" />
                      </MultiTrigger.Setters>
                    </MultiTrigger>
                    <MultiTrigger>
                      <MultiTrigger.Conditions>
                        <Condition Property="IsEnabled" Value="false" />
                      </MultiTrigger.Conditions>
                      <MultiTrigger.Setters>
                        <Setter Property="TextDecorations" Value="None" />
                      </MultiTrigger.Setters>
                    </MultiTrigger>
                  </Style.Triggers>
                </Style>
              </Hyperlink.Resources>
              <Run Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content}" />
            </Hyperlink>
          </TextBlock>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <Style x:Key="HashtagActionLink" TargetType="{x:Type Button}">
    <Setter Property="Background" Value="Transparent" />
    <Setter Property="Focusable" Value="True" />
    <Setter Property="Foreground" Value="{DynamicResource GitHubActionLinkItemBrush}" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <TextBlock>
            <Hyperlink Command="{TemplateBinding Command}"
                       CommandParameter="{TemplateBinding CommandParameter}"
                       Foreground="{TemplateBinding Foreground}">
              <Hyperlink.Resources>
                <Style TargetType="{x:Type Hyperlink}">
                  <Style.Triggers>
                    <MultiTrigger>
                      <MultiTrigger.Conditions>
                        <Condition Property="UIElement.IsMouseOver" Value="false" />
                        <Condition Property="IsEnabled" Value="true" />
                      </MultiTrigger.Conditions>
                      <MultiTrigger.Setters>
                        <Setter Property="TextDecorations" Value="None" />
                        <Setter Property="FrameworkElement.Cursor" Value="None" />
                      </MultiTrigger.Setters>
                    </MultiTrigger>
                    <MultiTrigger>
                      <MultiTrigger.Conditions>
                        <Condition Property="IsMouseOver" Value="true" />
                        <Condition Property="IsEnabled" Value="true" />
                      </MultiTrigger.Conditions>
                      <MultiTrigger.Setters>
                        <Setter Property="TextDecorations" Value="Underline" />
                        <Setter Property="FrameworkElement.Cursor" Value="Hand" />
                      </MultiTrigger.Setters>
                    </MultiTrigger>
                    <MultiTrigger>
                      <MultiTrigger.Conditions>
                        <Condition Property="IsEnabled" Value="false" />
                      </MultiTrigger.Conditions>
                      <MultiTrigger.Setters>
                        <Setter Property="TextDecorations" Value="None" />
                      </MultiTrigger.Setters>
                    </MultiTrigger>
                  </Style.Triggers>
                </Style>
              </Hyperlink.Resources>
              <Run Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content, StringFormat=#{0}}" />
            </Hyperlink>
          </TextBlock>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
</ResourceDictionary>