<controls:MetroWindow xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
                      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                      x:Class="SPCode.UI.Windows.GoToLineWindow"
                      WindowStartupLocation="CenterScreen" 
                      GlowBrush="{DynamicResource AccentColorBrush}" 
                      Background="{DynamicResource WhiteBrush}" 
                      ResizeMode="NoResize"
                      ShowInTaskbar="True" 
                      Height="104" 
                      Width="255" 
                      HorizontalAlignment="Center" 
                      VerticalAlignment="Center" 
                      UseNoneWindowStyle="False" 
                      TitlebarHeight="15" 
                      KeyDown="MetroWindow_KeyDown">

  <controls:MetroWindow.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Red.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/FlatButton.xaml" />
        <ResourceDictionary>
          <Storyboard x:Key="BlendOverEffect" Duration="00:00:00.5" Storyboard.TargetName="BlendEffectPlane" Storyboard.TargetProperty="Opacity">
            <DoubleAnimationUsingKeyFrames>
              <SplineDoubleKeyFrame Value="0.0" KeyTime="00:00:00.00" />
              <SplineDoubleKeyFrame Value="0.5" KeyTime="00:00:00.25" />
              <SplineDoubleKeyFrame Value="0.0" KeyTime="00:00:00.50" />
            </DoubleAnimationUsingKeyFrames>
          </Storyboard>
          <Storyboard x:Key="FadeFindReplaceGridIn" Duration="00:00:00.2" Storyboard.TargetName="FindReplaceGrid">
            <DoubleAnimation To="1" Duration="00:00:00.2" Storyboard.TargetProperty="Opacity" />
          </Storyboard>
          <Storyboard x:Key="FadeFindReplaceGridOut" Duration="00:00:00.2" Storyboard.TargetName="FindReplaceGrid">
            <DoubleAnimation To="0" Duration="00:00:00.2" Storyboard.TargetProperty="Opacity" />
          </Storyboard>
          <Storyboard x:Key="EnableServerAnim">
            <DoubleAnimation Duration="00:00:00.5" To="5" Storyboard.TargetName="ServerProgressBar" Storyboard.TargetProperty="Height" />
            <BooleanAnimationUsingKeyFrames Storyboard.TargetName="ServerProgressBar" Storyboard.TargetProperty="IsIndeterminate">
              <BooleanAnimationUsingKeyFrames.KeyFrames>
                <BooleanKeyFrameCollection>
                  <DiscreteBooleanKeyFrame KeyTime="00:00:00.25" Value="True" />
                </BooleanKeyFrameCollection>
              </BooleanAnimationUsingKeyFrames.KeyFrames>
            </BooleanAnimationUsingKeyFrames>
          </Storyboard>
          <Storyboard x:Key="DisableServerAnim">
            <DoubleAnimation Duration="00:00:00.5" To="0" Storyboard.TargetName="ServerProgressBar" Storyboard.TargetProperty="Height" />
            <BooleanAnimationUsingKeyFrames Storyboard.TargetName="ServerProgressBar" Storyboard.TargetProperty="IsIndeterminate">
              <BooleanAnimationUsingKeyFrames.KeyFrames>
                <BooleanKeyFrameCollection>
                  <DiscreteBooleanKeyFrame KeyTime="00:00:00.25" Value="False" />
                </BooleanKeyFrameCollection>
              </BooleanAnimationUsingKeyFrames.KeyFrames>
            </BooleanAnimationUsingKeyFrames>
          </Storyboard>
        </ResourceDictionary>
      </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
  </controls:MetroWindow.Resources>
  
  <Grid x:Name="GoToLineMainGrid">
    <TextBox Name="JumpNumber" VerticalAlignment="Top" Text="1" KeyDown="JumpNumberKeyDown" Foreground="{DynamicResource BlackColorBrush}" Margin="5,5,5,0" TextChanged="JumpNumber_TextChanged" />
    <RadioButton Name="rbLineJump" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5,0,0,0" IsChecked="True" Foreground="{DynamicResource BlackColorBrush}" Checked="RbLineJump_Checked" />
    <RadioButton Name="rbOffsetJump" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,55,0,0" IsChecked="False" Foreground="{DynamicResource BlackColorBrush}" Checked="RbOffsetJump_Checked" />
    <Button Name="btJump" HorizontalAlignment="Right" VerticalAlignment="Top" Width="100" Margin="0,45,5,0" Click="JumpToNumber"/>
    <Label Name="lblError" HorizontalAlignment="Right" Margin="0,5,5,0" VerticalAlignment="Top" Foreground="Red" FontWeight="Bold"/>
  </Grid>
</controls:MetroWindow>
