<Window x:Class="ScreenToGif.Windows.Other.Encoder"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:c="clr-namespace:ScreenToGif.Controls"
        Title="{DynamicResource S.Encoder.Title}" Icon="/Resources/Logo.ico" Width="320" Height="400" 
        MinWidth="300" MinHeight="300" Background="{DynamicResource Panel.Background}" Closing="Window_Closing" Activated="Window_Activated">

    <Window.CommandBindings>
        <CommandBinding Command="{StaticResource Command.ClearAll}" CanExecute="ClearAll_CanExecute" Executed="ClearAll_Executed"/>
    </Window.CommandBindings>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <Grid Grid.Row="0" Background="{DynamicResource Panel.Background.Level4}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>

            <Border Grid.Column="0" Background="{StaticResource Vector.ImageStack}" Margin="5" Height="32" Width="32" Opacity="{DynamicResource Element.Opacity}"/>

            <Label Grid.Column="1" x:Name="EncoderLabel" Content="{DynamicResource S.Encoder.Title}" Margin="10,0,10,0" VerticalAlignment="Center" Padding="2" 
                   FontSize="24" FontFamily="Segoe UI Semilight" Foreground="{DynamicResource Element.Foreground.Header}">
                <Label.Triggers>
                    <EventTrigger RoutedEvent="Label.Loaded">
                        <BeginStoryboard>
                            <Storyboard BeginTime="00:00:00" Storyboard.TargetName="EncoderLabel" Storyboard.TargetProperty="(FontSize)">
                                <DoubleAnimation From="24" To="18" Duration="0:0:2">
                                    <DoubleAnimation.EasingFunction>
                                        <PowerEase Power="20" EasingMode="EaseOut"/>
                                    </DoubleAnimation.EasingFunction>
                                </DoubleAnimation>
                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger>
                </Label.Triggers>
            </Label>

            <c:ExtendedButton Grid.Column="2" x:Name="ClearAllButton" Icon="{DynamicResource Vector.Eraser}" ContentWidth="18" ContentHeight="18" MinWidth="30"
                              HorizontalContentAlignment="Center" HorizontalAlignment="Center" Style="{DynamicResource Style.Button.NoText}" 
                              Command="{StaticResource Command.ClearAll}" IsEnabled="{Binding Path=HasItems, ElementName=EncodingListView}"
                              ToolTip="{Binding Command, RelativeSource={RelativeSource Self}, Converter={StaticResource CommandToInputGestureText}}"
                              ToolTipService.Placement="Bottom" ToolTipService.HorizontalOffset="-5"/>
        </Grid>

        <c:StatusBand Grid.Row="1" x:Name="StatusBand"/>
        
        <c:NotificationBox Grid.Row="2" x:Name="NotificationBox" OnlyDisplayList="True" BorderThickness="0" Margin="0"/>
    </Grid>
</Window>