<UserControl x:Class="MyPad.Views.Regions.PrintPreviewContentView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
             xmlns:p="http://prismlibrary.com/"
             xmlns:m="http://metro.mahapps.com/winfx/xaml/controls"
             xmlns:mi="http://metro.mahapps.com/winfx/xaml/iconpacks"
             xmlns:le="http://wpflocalizeextension.codeplex.com"
             xmlns:qc="http://QuickConverter.CodePlex.com/"
             xmlns:ge="clr-namespace:SourceChord.GridExtra;assembly=GridExtra.Wpf"
             xmlns:controls="clr-namespace:MyPad.Views.Controls"
             mc:Ignorable="d" 
             p:ViewModelLocator.AutoWireViewModel="True"
             d:DesignHeight="450" d:DesignWidth="800">

    <Grid Margin="20 0 20 20" MaxWidth="{StaticResource Const.BreakPoint.XL}">
        <Grid Visibility="{qc:Binding '$P != 0 ? Visibility.Visible : Visibility.Collapsed', P={Binding ActiveTextEditor.Value.TextLength, Mode=OneWay}}">
            <controls:FlowDocumentViewer Document="{Binding FlowDocument.Value, Mode=OneWay}" ContextMenu="{x:Null}" Focusable="False"/>
        </Grid>
        <Grid Visibility="{qc:Binding '$P == 0 ? Visibility.Visible : Visibility.Collapsed', P={Binding ActiveTextEditor.Value.TextLength, Mode=OneWay}}">
            <Border d:IsHidden="True" Style="{StaticResource Common.Overlay}">
                <StackPanel Margin="5 0" HorizontalAlignment="Stretch" VerticalAlignment="Center">
                    <TextBlock Text="{le:Loc Text_EmptyDocument}" HorizontalAlignment="Center" TextAlignment="Center"/>
                </StackPanel>
            </Border>
        </Grid>
        <StackPanel Margin="10" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom">
            <Button Command="{Binding PrintCommand, Mode=OneTime}" ToolTip="{le:Loc Command_Print}" Style="{StaticResource Common.CircleAccentButton}">
                <mi:BootstrapIcons Kind="Printer"/>
            </Button>
            <Border Width="{x:Static SystemParameters.VerticalScrollBarWidth}"/>
        </StackPanel>
    </Grid>
    
</UserControl>
