<UserControl x:Class="NETworkManager.Controls.PuTTYControl"
        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:Converter="clr-namespace:NETworkManager.Converters"
        xmlns:WindowsForms="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
        xmlns:Dialog="clr-namespace:MahApps.Metro.Controls.Dialogs;assembly=MahApps.Metro"
        Dialog:DialogParticipation.Register="{Binding}"
        mc:Ignorable="d" Loaded="UserControl_Loaded">
    <UserControl.Resources>
        <Converter:BooleanReverseToVisibilityConverter x:Key="BooleanReverseToVisibilityConverter" />
        <Converter:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
    </UserControl.Resources>
    <Grid x:Name="puTTYGrid" SizeChanged="PuTTYGrid_SizeChanged">
        <WindowsFormsHost Visibility="{Binding Connected, Converter={StaticResource BooleanToVisibilityConverter}}">  
            <WindowsForms:Panel x:Name="puTTYHost" />
        </WindowsFormsHost>
        <Grid VerticalAlignment="Center" HorizontalAlignment="Center" TextBlock.TextAlignment="Center" Visibility="{Binding Connected, Converter={StaticResource BooleanReverseToVisibilityConverter}}">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="20" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <TextBlock Grid.Row="0" Text="{DynamicResource String_Header_Disconnected}" Style="{StaticResource HeaderTextBlock}" />
            <TextBlock Grid.Row="1" Foreground="{DynamicResource AccentColorBrush}" Text="{DynamicResource String_PuTTYProcessHasEnded}" Style="{DynamicResource DefaultTextBlock}" />
            <Button Grid.Row="4" Content="{DynamicResource String_Button_Reconnect}" Command="{Binding ReconnectCommand}" IsDefault="True" Style="{StaticResource DefaultButton}"/>
        </Grid>
    </Grid>
</UserControl>
