<UserControl
    x:Class="PDF_Office.Views.PropertyPanel.ViewModular.ReadViewContent"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Viewer="clr-namespace:ComPDFKitViewer.PdfViewer;assembly=ComPDFKit.Viewer"
    xmlns:convert="clr-namespace:PDF_Office.DataConvert"
    xmlns:cus="clr-namespace:PDF_Office.CustomControl"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
    xmlns:local="clr-namespace:PDF_Office.Views.PropertyPanel.ViewModular"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:prism="http://prismlibrary.com/"
    xmlns:viewmodels="clr-namespace:PDF_Office.ViewModels.PropertyPanel.ViewModular"
    d:DataContext="{d:DesignInstance Type=viewmodels:ReadViewContentViewModel}"
    d:DesignHeight="450"
    d:DesignWidth="800"
    prism:ViewModelLocator.AutoWireViewModel="True"
    KeyDown="UserControl_KeyDown"
    mc:Ignorable="d">
    <i:Interaction.Triggers>
        <i:EventTrigger EventName="Loaded">
            <prism:InvokeCommandAction Command="{Binding Load}" />
        </i:EventTrigger>
    </i:Interaction.Triggers>
    <Grid>
        <ContentControl
            x:Name="PDFViewerContent"
            HorizontalAlignment="Stretch"
            prism:RegionManager.RegionName="{Binding ReadRegionName}" />
        <!--阅读模式下的页面控件-->
        <ContentControl
            x:Name="ReadModeContent"
            Height="44"
            Margin="0,0,0,5"
            HorizontalAlignment="Center"
            VerticalAlignment="Bottom"
            prism:RegionManager.RegionName="{Binding ReadModeRegionName}"
            MouseEnter="RectangleReadMode_MouseEnter"
            MouseLeave="ReadModeContent_MouseLeave"
            Visibility="{Binding ReadModeContentVisibility}" />

        <Rectangle
            x:Name="RectangleReadMode"
            Width="{Binding ActualWidth, ElementName=ReadModeContent, Mode=OneWay}"
            Height="44"
            Margin="0,0,0,5"
            HorizontalAlignment="Center"
            VerticalAlignment="Bottom"
            Fill="Transparent"
            MouseEnter="RectangleReadMode_MouseEnter"
            Visibility="{Binding RectangleReadModeVisibility}" />
    </Grid>
</UserControl>