<UserControl x:Class="HandBrakeWPF.Controls.StatusPanel"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:ctr="clr-namespace:HandBrakeWPF.Controls">

    <UserControl.Resources>
        <BooleanToVisibilityConverter x:Key="boolTovisibility" />
    </UserControl.Resources>

    <DockPanel Background="Black" Opacity="0.85"
               Visibility="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, 
                            Path=IsLoading, Mode=OneWay, Converter={StaticResource boolTovisibility}}">

        <ctr:Loading DockPanel.Dock="Left" HorizontalAlignment="Left" VerticalAlignment="Top"
                     Height="45" Margin="18,10" />

        <StackPanel VerticalAlignment="Top">
            <TextBlock SnapsToDevicePixels="True" VerticalAlignment="Top" FontSize="16" Margin="0,11,0,0" HorizontalAlignment="Left"
                       FontWeight="Bold"
                       Text="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Path=Message}" 
                       Foreground="LightBlue" />

            <TextBlock SnapsToDevicePixels="True" VerticalAlignment="Top" FontSize="12" Margin="0,5" HorizontalAlignment="Left"
                       Text="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Path=SubMessage}" 
                       Foreground="LightBlue" />
        </StackPanel>
    </DockPanel>
</UserControl>
