<wpf:ThemableWindow x:Class="InABox.WPF.ProgressForm"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:wpf="clr-namespace:InABox.Wpf"
        mc:Ignorable="d"
        Title="ProgressForm"
        WindowStartupLocation="CenterScreen"
        WindowStyle="None"
        BorderThickness="0"
        BorderBrush="Transparent"
        AllowsTransparency="True"
        Background="Transparent"
        MouseDown="Window_MouseDown"
        Width="350" Height="200"
                    x:Name="Window">
    <Window.Resources>
        <Style TargetType="Button" x:Key="RoundButton">
            <Style.Resources>
                <Style TargetType="Border">
                    <Setter Property="CornerRadius" Value="10"/>
                </Style>
            </Style.Resources>
        </Style>
    </Window.Resources>
    <Border CornerRadius="10" BorderBrush="Gray" BorderThickness="0.75" Padding="5,5,5,0" Background="White">
        <Grid Margin="5">
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Image Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3"
                   x:Name="Splash" Margin="20,10,20,10" Stretch="Uniform" Source="../Resources/splash.png" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />

            <Label
                Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3"
                FontSize="14"
                FontStyle="Oblique"
                x:Name="Progress"
                Content="Please wait..."
                Margin="0"
                HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                HorizontalContentAlignment="Center"
                VerticalContentAlignment="Center"
                Background="Transparent" />

            <Button x:Name="CancelButton" Style="{StaticResource RoundButton}"
                    Background="LightYellow"
                    Content="{Binding ElementName=Window,Path=CancelText}"
                    Visibility="{Binding ElementName=Window,Path=CancelButtonVisibility}"
                    Padding="5" Margin="5"
                    Grid.Row="2" Grid.Column="1"
                    Click="CancelButton_Click"/>
        </Grid>
    </Border>
</wpf:ThemableWindow>