<helpers:PerformanceTransparentWin xmlns:props="clr-namespace:Ink_Canvas.Properties" x:Name="window" x:Class="Ink_Canvas.MainWindow"
        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:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
        xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
        xmlns:c="clr-namespace:Ink_Canvas.Converter"
        xmlns:Controls="http://schemas.microsoft.com/netfx/2009/xaml/presentation"
        xmlns:controls="clr-namespace:Ink_Canvas.Controls;assembly=InkCanvas.Controls"
        xmlns:localControls="clr-namespace:Ink_Canvas.Controls"
        xmlns:Windows="clr-namespace:Ink_Canvas.Windows"
        xmlns:helpers="clr-namespace:Ink_Canvas.Helpers"
        xmlns:wmk="clr-namespace:WPFMediaKit.DirectShow.Controls;assembly=WPFMediaKit"
        xmlns:icons="clr-namespace:Ink_Canvas"
        mc:Ignorable="d"
        WindowStyle="None"
        ResizeMode="NoResize"
        Loaded="Window_Loaded"
        Background="Transparent"
        ShowInTaskbar="False"
        PreviewMouseDown="Window_PreviewMouseDown"
        Title="InkCanvasforClass"
        Topmost="True"
        Closing="Window_Closing"
        Closed="Window_Closed"
        PreviewKeyDown="Main_Grid_PreviewKeyDown"
        Height="1080" Width="1920"
        FontFamily="Microsoft YaHei UI"
        MouseWheel="Window_MouseWheel"
        Foreground="{DynamicResource FloatingBarForegroundBrush}"
        SizeChanged="MainWindow_OnSizeChanged"
        MouseMove="MainWindow_OnMouseMove"
        Stylus.IsPressAndHoldEnabled="False"
        Stylus.IsFlicksEnabled="False"
        Stylus.IsTapFeedbackEnabled="False"
        DpiChanged="MainWindow_OnDpiChanged"
        Stylus.IsTouchFeedbackEnabled="False">
    <!--资源中添加命令-->
    <helpers:PerformanceTransparentWin.Resources>
        <ResourceDictionary>
            <!-- 合并新橡皮擦资源 -->
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="MainWindow_cs/MW_Eraser.xaml"/>
            </ResourceDictionary.MergedDictionaries>

            <c:IsEnabledToOpacityConverter x:Key="IsEnabledToOpacityConverter" />
            <c:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
            <c:InverseBooleanToVisibilityConverter x:Key="InverseBooleanToVisibilityConverter" />
            <c:VisibilityConverter x:Key="VisibilityConverter" />
            <c:IntNumberToString x:Key="IntNumberToString" />
            <c:IntNumberToString2 x:Key="IntNumberToString2" />
            <c:StringToGeometryConverter x:Key="StringToGeometryConverter" />

            <!-- 浮动栏/白板栏：英文等长文本自动缩小避免截断 -->
            <Style x:Key="AutoFitFloatBarLabel12" TargetType="TextBlock">
                <Setter Property="TextWrapping" Value="NoWrap" />
                <Setter Property="TextAlignment" Value="Center" />
                <Setter Property="helpers:AutoFontSizeHelper.IsEnabled" Value="True" />
                <Setter Property="helpers:AutoFontSizeHelper.MinFontSize" Value="7" />
                <Setter Property="helpers:AutoFontSizeHelper.MaxFontSize" Value="12" />
                <Setter Property="helpers:AutoFontSizeHelper.Step" Value="0.5" />
            </Style>

            <Style x:Key="AutoFitFloatBarLabel9" TargetType="TextBlock">
                <Setter Property="TextWrapping" Value="NoWrap" />
                <Setter Property="TextAlignment" Value="Center" />
                <Setter Property="helpers:AutoFontSizeHelper.IsEnabled" Value="True" />
                <Setter Property="helpers:AutoFontSizeHelper.MinFontSize" Value="6" />
                <Setter Property="helpers:AutoFontSizeHelper.MaxFontSize" Value="9" />
                <Setter Property="helpers:AutoFontSizeHelper.Step" Value="0.5" />
            </Style>

            <Style x:Key="AutoFitFloatBarLabel8" TargetType="TextBlock">
                <Setter Property="TextWrapping" Value="NoWrap" />
                <Setter Property="TextAlignment" Value="Center" />
                <Setter Property="helpers:AutoFontSizeHelper.IsEnabled" Value="True" />
                <Setter Property="helpers:AutoFontSizeHelper.MinFontSize" Value="3.5" />
                <Setter Property="helpers:AutoFontSizeHelper.MaxFontSize" Value="8" />
                <Setter Property="helpers:AutoFontSizeHelper.Step" Value="0.25" />
            </Style>

            <Style x:Key="AutoFitMainToolbarLabel8" TargetType="TextBlock" BasedOn="{StaticResource AutoFitFloatBarLabel8}">
                <Setter Property="Height" Value="10" />
                <Setter Property="LineStackingStrategy" Value="BlockLineHeight" />
                <Setter Property="LineHeight" Value="10" />
                <Setter Property="helpers:AutoFontSizeHelper.MinFontSize" Value="2.5" />
                <Setter Property="helpers:AutoFontSizeHelper.Step" Value="0.1" />
            </Style>

            <Style x:Key="AutoFitPenTabLabel9" TargetType="TextBlock">
                <Setter Property="TextWrapping" Value="NoWrap" />
                <Setter Property="TextAlignment" Value="Center" />
                <Setter Property="helpers:AutoFontSizeHelper.IsEnabled" Value="True" />
                <Setter Property="helpers:AutoFontSizeHelper.MinFontSize" Value="3.5" />
                <Setter Property="helpers:AutoFontSizeHelper.MaxFontSize" Value="9" />
                <Setter Property="helpers:AutoFontSizeHelper.Step" Value="0.1" />
            </Style>

            <Style x:Key="AutoFitSettingsOptionLabel14" TargetType="TextBlock">
                <Setter Property="TextWrapping" Value="Wrap" />
                <Setter Property="TextAlignment" Value="Left" />
                <Setter Property="helpers:AutoFontSizeHelper.IsEnabled" Value="True" />
                <Setter Property="helpers:AutoFontSizeHelper.MinFontSize" Value="8" />
                <Setter Property="helpers:AutoFontSizeHelper.MaxFontSize" Value="14" />
                <Setter Property="helpers:AutoFontSizeHelper.Step" Value="0.25" />
            </Style>

            <Style x:Key="AutoFitSettingsHint15" TargetType="TextBlock">
                <Setter Property="TextWrapping" Value="Wrap" />
                <Setter Property="TextAlignment" Value="Center" />
                <Setter Property="helpers:AutoFontSizeHelper.IsEnabled" Value="True" />
                <Setter Property="helpers:AutoFontSizeHelper.MinFontSize" Value="10" />
                <Setter Property="helpers:AutoFontSizeHelper.MaxFontSize" Value="15" />
                <Setter Property="helpers:AutoFontSizeHelper.Step" Value="0.25" />
            </Style>

            <Style x:Key="AutoFitSettingsGridLabel14" TargetType="TextBlock">
                <Setter Property="TextWrapping" Value="Wrap" />
                <Setter Property="TextAlignment" Value="Center" />
                <Setter Property="helpers:AutoFontSizeHelper.IsEnabled" Value="True" />
                <Setter Property="helpers:AutoFontSizeHelper.MinFontSize" Value="8" />
                <Setter Property="helpers:AutoFontSizeHelper.MaxFontSize" Value="14" />
                <Setter Property="helpers:AutoFontSizeHelper.Step" Value="0.25" />
            </Style>

            <Style x:Key="AutoFitGestureOptionLabel10" TargetType="Label">
                <Setter Property="Foreground" Value="{DynamicResource FloatingBarForegroundBrush}" />
                <Setter Property="FontWeight" Value="Normal" />
                <Setter Property="Padding" Value="0" />
                <Setter Property="HorizontalContentAlignment" Value="Left" />
                <Setter Property="VerticalContentAlignment" Value="Center" />
                <Setter Property="helpers:AutoFontSizeHelper.IsEnabled" Value="True" />
                <Setter Property="helpers:AutoFontSizeHelper.MinFontSize" Value="4" />
                <Setter Property="helpers:AutoFontSizeHelper.MaxFontSize" Value="8" />
                <Setter Property="helpers:AutoFontSizeHelper.Step" Value="0.25" />
            </Style>

            <Style x:Key="AutoFitBoardGestureOptionLabel10" TargetType="Label" BasedOn="{StaticResource AutoFitGestureOptionLabel10}">
                <Setter Property="helpers:AutoFontSizeHelper.MinFontSize" Value="5" />
                <Setter Property="helpers:AutoFontSizeHelper.MaxFontSize" Value="10" />
            </Style>
        </ResourceDictionary>
    </helpers:PerformanceTransparentWin.Resources>
    <Grid x:Name="Main_Grid">
        <!--黑/白 板幕布-->
        <Grid Name="GridBackgroundCoverHolder">
            <Grid Name="GridBackgroundCover" Visibility="Collapsed" Background="#1F1F1F">
                <Image Name="ICCWaterMarkWhite" Source="Resources/Icons-png/icc-transparent.png" Width="648"
                       Height="648" Opacity="0.035" />
                <Image Name="ICCWaterMarkDark" Source="Resources/Icons-png/icc-transparent-dark.png" Width="648"
                       Height="648" Opacity="0.055" />

                <!-- 视频展台特殊模式：全屏预览层 + 居中占位文字 -->
                <Grid Name="VideoPresenterSpecialModeContainer"
                      Visibility="Collapsed"
                      Background="#333333"
                      IsManipulationEnabled="True"
                      ManipulationDelta="VideoPresenterSpecialMode_ManipulationDelta"
                      ManipulationStarting="VideoPresenterSpecialMode_ManipulationStarting"
                      MouseWheel="VideoPresenterSpecialMode_MouseWheel">
                    <!-- 全屏摄像头预览：VideoCaptureElement 自动 VMR9 + D3DImage 零拷贝 GPU 渲染
                         （DirectShow 采集 + D3D9 表面 + D3DImage，无 CPU 拷贝，无 OOM）
                         RenderTransformOrigin 必须为 (0,0)：
                         缩放公式 translate_new = origin - (origin - translate_old) * ratio 只在 (0,0) 下成立，
                         与 EasiCamera TranslateZoomRotateExtensionBehavior.EnsureTransform 的设计一致。 -->
                    <helpers:CapturableVideoCaptureElement x:Name="VideoPresenterFullCanvasImage"
                                             Stretch="Uniform"
                                             UseYuv="False"
                                             EnableSampleGrabbing="False"
                                             LoadedBehavior="Manual"
                                             UnloadedBehavior="Stop"
                                             MediaOpened="VideoPresenterFullCanvasImage_MediaOpened"
                                             MediaFailed="VideoPresenterFullCanvasImage_MediaFailed"
                                             RenderTransformOrigin="0,0">
                        <!-- LayoutTransform 用于旋转：旋转 90/270 时 WPF 自动重新布局（宽高交换），
                             避免画面被裁剪；缩放/位移仍走 RenderTransform -->
                        <helpers:CapturableVideoCaptureElement.LayoutTransform>
                            <RotateTransform x:Name="VideoPresenterFullCanvasRotation" Angle="0" />
                        </helpers:CapturableVideoCaptureElement.LayoutTransform>
                        <helpers:CapturableVideoCaptureElement.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform x:Name="VideoPresenterFullCanvasScale" ScaleX="1" ScaleY="1" />
                                <TranslateTransform x:Name="VideoPresenterFullCanvasTranslate" X="0" Y="0" />
                            </TransformGroup>
                        </helpers:CapturableVideoCaptureElement.RenderTransform>
                    </helpers:CapturableVideoCaptureElement>
                    <!-- 拍照后冻结画面：覆盖在 VideoCaptureElement 之上，显示拍照的照片，
                         让用户在照片上批注。LayoutTransform/RenderTransform 与 VideoCaptureElement 同步。 -->
                    <Image x:Name="VideoPresenterFrozenFrameImage"
                           Stretch="Uniform"
                           RenderTransformOrigin="0,0"
                           Visibility="Collapsed">
                        <Image.LayoutTransform>
                            <RotateTransform x:Name="VideoPresenterFrozenFrameRotation" Angle="0" />
                        </Image.LayoutTransform>
                        <Image.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform x:Name="VideoPresenterFrozenFrameScale" ScaleX="1" ScaleY="1" />
                                <TranslateTransform x:Name="VideoPresenterFrozenFrameTranslate" X="0" Y="0" />
                            </TransformGroup>
                        </Image.RenderTransform>
                    </Image>
                    <!-- 没找到摄像头时的占位文字 -->
                    <TextBlock x:Name="VideoPresenterSearchingText"
                               HorizontalAlignment="Center"
                               VerticalAlignment="Center"
                               FontSize="24"
                               Foreground="#CCCCCC"
                               Text="正在查找展台设备..." />
                </Grid>
            </Grid>
        </Grid>
        <Grid Name="GridTransparencyFakeBackground" Opacity="0" />
        <Label Name="Label" Visibility="Collapsed" Foreground="Gray" Content="0" />
        <Grid Name="InkCanvasGridForInkReplay" d:Visibility="Collapsed">
            <InkCanvas x:Name="inkCanvas" ForceCursor="True" UseCustomCursor="True"
                       TouchDown="Main_Grid_TouchDown"
                       TouchMove="inkCanvas_TouchMove"
                       ManipulationDelta="Main_Grid_ManipulationDelta"
                       ManipulationCompleted="Main_Grid_ManipulationCompleted"
                       ManipulationInertiaStarting="InkCanvas_ManipulationInertiaStarting"
                       IsManipulationEnabled="True"
                       EditingModeChanged="inkCanvas_EditingModeChanged"
                       PreviewTouchDown="InkCanvas_PreviewTouchDown"
                       PreviewTouchMove="InkCanvas_PreviewTouchMove"
                       PreviewTouchUp="InkCanvas_PreviewTouchUp"
                       MouseDown="inkCanvas_MouseDown"
                       MouseMove="inkCanvas_MouseMove"
                       MouseUp="inkCanvas_MouseUp"
                       ManipulationStarting="InkCanvas_ManipulationStarting"
                       SelectionChanged="inkCanvas_SelectionChanged"
                       StrokeCollected="inkCanvas_StrokeCollected" 
                       ClipToBounds="False" 
                       Background="Transparent" />

            <Canvas x:Name="EraserOverlayCanvas" d:Visibility="Collapsed"
                    Background="Transparent"
                    IsHitTestVisible="False"
                    Loaded="EraserOverlayCanvas_Loaded"
                    Panel.ZIndex="1000">
                <!-- 橡皮擦视觉反馈图像 -->
                <Image x:Name="EraserFeedback"
                       Canvas.Left="0"
                       Canvas.Top="0"
                       RenderTransformOrigin="0,0"
                       Width="0"
                       Height="0"
                       Visibility="Collapsed">
                    <Image.RenderTransform>
                        <TranslateTransform x:Name="EraserFeedbackTranslateTransform"/>
                    </Image.RenderTransform>
                </Image>
            </Canvas>

            <!-- 边缘扩展画布提示按钮（书写贴近边缘时浮现）。
                 用 Popup 实现，确保永远在最顶层且不被 InkCanvasGridForInkReplay 的兄弟节点
                 （如 GridInkCanvasSelectionCover）遮挡命中测试。PlacementTarget 设为 inkCanvas，
                 Placement=RelativePoint 让 HorizontalOffset/VerticalOffset 直接对应画布坐标。 -->
            <Popup x:Name="EdgeExpandHintPopup"
                   Placement="RelativePoint"
                   PlacementTarget="{Binding ElementName=inkCanvas}"
                   AllowsTransparency="True"
                   StaysOpen="True"
                   IsOpen="False"
                   PopupAnimation="None"
                   HorizontalOffset="0"
                   VerticalOffset="0">
                <Button x:Name="EdgeExpandHintButton"
                        Content="..."
                        Width="64" Height="64"
                        Padding="0"
                        FontSize="14"
                        FontWeight="SemiBold"
                        Foreground="White"
                        Background="#CC2D2D30"
                        BorderBrush="#992D2D30"
                        BorderThickness="1"
                        Visibility="Visible"
                        IsHitTestVisible="True"
                        Cursor="Hand"
                        Click="EdgeExpandHintButton_Click"
                        Opacity="0.9"
                        ToolTip="扩展画布" />
            </Popup>

            <!-- 快抽悬浮按钮 -->
            <localControls:QuickDrawFloatingButtonControl x:Name="QuickDrawFloatingButton"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Bottom"
                    Margin="0,0,0,200"
                    Visibility="Collapsed"  d:Visibility="Visible"
                    Panel.ZIndex="1001"/>
        </Grid>
        <Canvas IsHitTestVisible="False">
            <ikw:SimpleStackPanel Canvas.Left="25" Canvas.Top="15" Orientation="Vertical">
                <TextBlock Text="{Binding nowTime}" Name="WaterMarkTime" Visibility="Collapsed"  d:Visibility="Visible" FontSize="30"
                           FontWeight="Bold" Foreground="White" Opacity="0.6" />
                <TextBlock Text="{Binding nowDate}" Name="WaterMarkDate" Visibility="Collapsed"  d:Visibility="Visible" Margin="2,0,0,0"
                           FontSize="16" Foreground="White" Opacity="0.45" />
            </ikw:SimpleStackPanel>
            <TextBlock Text="{x:Static props:MainWindowStrings.Main_WatermarkText}" Name="BlackBoardWaterMark"
                       Visibility="Collapsed"  d:Visibility="Visible" FontSize="24" FontWeight="Bold" Foreground="White" Opacity="0.5" />
        </Canvas>
        <!--墨迹/图片选择器-->
        <Grid Visibility="{Binding ElementName=inkCanvas, Path=Visibility}">
            <Grid Name="GridInkCanvasSelectionCover"
                  MouseDown="GridInkCanvasSelectionCover_MouseDown"
                  MouseMove="GridInkCanvasSelectionCover_MouseMove"
                  MouseUp="GridInkCanvasSelectionCover_MouseUp"
                  StylusDown="GridInkCanvasSelectionCover_StylusDown"
                  StylusMove="GridInkCanvasSelectionCover_StylusMove"
                  StylusUp="GridInkCanvasSelectionCover_StylusUp"
                  IsManipulationEnabled="True"
                  ManipulationStarting="GridInkCanvasSelectionCover_ManipulationStarting"
                  ManipulationCompleted="GridInkCanvasSelectionCover_ManipulationCompleted"
                  ManipulationDelta="GridInkCanvasSelectionCover_ManipulationDelta"
                  TouchDown="GridInkCanvasSelectionCover_TouchDown"
                  TouchUp="GridInkCanvasSelectionCover_TouchUp"
                  TouchMove="GridInkCanvasSelectionCover_TouchMove"
                  Background="#01FFFFFF" Opacity="0.01" Visibility="Collapsed" Margin="1,0,-1,0">

                <!-- 选择框 -->
                <Rectangle Name="SelectionRectangle"
                           Stroke="Blue"
                           StrokeThickness="2"
                           StrokeDashArray="5,5"
                           Fill="Transparent"
                           Visibility="Collapsed"  d:Visibility="Visible"
                           IsHitTestVisible="False"
                           HorizontalAlignment="Left"
                           VerticalAlignment="Top" />

                <!-- 选择点容器 -->
                <Canvas Name="SelectionHandlesCanvas" Visibility="Collapsed"  d:Visibility="Visible">
                    <!-- 四个角选择点 -->
                    <Rectangle Name="TopLeftHandle" Width="8" Height="8" Fill="LightBlue" Stroke="Blue" StrokeThickness="1" 
                               Cursor="SizeNWSE" MouseDown="SelectionHandle_MouseDown" MouseMove="SelectionHandle_MouseMove" MouseUp="SelectionHandle_MouseUp" 
                               TouchDown="SelectionHandle_TouchDown" TouchMove="SelectionHandle_TouchMove" TouchUp="SelectionHandle_TouchUp" />
                    <Rectangle Name="TopRightHandle" Width="8" Height="8" Fill="LightBlue" Stroke="Blue" StrokeThickness="1" 
                               Cursor="SizeNESW" MouseDown="SelectionHandle_MouseDown" MouseMove="SelectionHandle_MouseMove" MouseUp="SelectionHandle_MouseUp" 
                               TouchDown="SelectionHandle_TouchDown" TouchMove="SelectionHandle_TouchMove" TouchUp="SelectionHandle_TouchUp" />
                    <Rectangle Name="BottomLeftHandle" Width="8" Height="8" Fill="LightBlue" Stroke="Blue" StrokeThickness="1" 
                               Cursor="SizeNESW" MouseDown="SelectionHandle_MouseDown" MouseMove="SelectionHandle_MouseMove" MouseUp="SelectionHandle_MouseUp" 
                               TouchDown="SelectionHandle_TouchDown" TouchMove="SelectionHandle_TouchMove" TouchUp="SelectionHandle_TouchUp" />
                    <Rectangle Name="BottomRightHandle" Width="8" Height="8" Fill="LightBlue" Stroke="Blue" StrokeThickness="1" 
                               Cursor="SizeNWSE" MouseDown="SelectionHandle_MouseDown" MouseMove="SelectionHandle_MouseMove" MouseUp="SelectionHandle_MouseUp" 
                               TouchDown="SelectionHandle_TouchDown" TouchMove="SelectionHandle_TouchMove" TouchUp="SelectionHandle_TouchUp" />

                    <!-- 四个边选择点 -->
                    <Rectangle Name="TopHandle" Width="8" Height="8" Fill="LightBlue" Stroke="Blue" StrokeThickness="1" 
                               Cursor="SizeNS" MouseDown="SelectionHandle_MouseDown" MouseMove="SelectionHandle_MouseMove" MouseUp="SelectionHandle_MouseUp" 
                               TouchDown="SelectionHandle_TouchDown" TouchMove="SelectionHandle_TouchMove" TouchUp="SelectionHandle_TouchUp" />
                    <Rectangle Name="BottomHandle" Width="8" Height="8" Fill="LightBlue" Stroke="Blue" StrokeThickness="1" 
                               Cursor="SizeNS" MouseDown="SelectionHandle_MouseDown" MouseMove="SelectionHandle_MouseMove" MouseUp="SelectionHandle_MouseUp" 
                               TouchDown="SelectionHandle_TouchDown" TouchMove="SelectionHandle_TouchMove" TouchUp="SelectionHandle_TouchUp" />
                    <Rectangle Name="LeftHandle" Width="8" Height="8" Fill="LightBlue" Stroke="Blue" StrokeThickness="1" 
                               Cursor="SizeWE" MouseDown="SelectionHandle_MouseDown" MouseMove="SelectionHandle_MouseMove" MouseUp="SelectionHandle_MouseUp" 
                               TouchDown="SelectionHandle_TouchDown" TouchMove="SelectionHandle_TouchMove" TouchUp="SelectionHandle_TouchUp" />
                    <Rectangle Name="RightHandle" Width="8" Height="8" Fill="LightBlue" Stroke="Blue" StrokeThickness="1" 
                               Cursor="SizeWE" MouseDown="SelectionHandle_MouseDown" MouseMove="SelectionHandle_MouseMove" MouseUp="SelectionHandle_MouseUp" 
                               TouchDown="SelectionHandle_TouchDown" TouchMove="SelectionHandle_TouchMove" TouchUp="SelectionHandle_TouchUp" />
                </Canvas>
            </Grid>
            <Border Name="BorderStrokeSelectionControl"
                    HorizontalAlignment="Left" VerticalAlignment="Top" Margin="800,400,0,0"
                    CornerRadius="5" Height="80"
                    Background="{DynamicResource FloatingBarBackgroundBrush}" d:BorderBrush="Red" d:Background="Green"
                    Visibility="{Binding ElementName=GridInkCanvasSelectionCover, Path=Visibility}"
                    BorderThickness="1" BorderBrush="{DynamicResource FloatingBarBorderBrush}">
                <Viewbox Margin="0,-2.5">
                    <ikw:SimpleStackPanel Orientation="Horizontal" Spacing="10" Height="60">
                        <Border Name="BorderStrokeSelectionClone" Margin="0,2,-9,2" Background="Transparent"
                                CornerRadius="{Binding ElementName=BorderStrokeSelectionControl, Path=CornerRadius}"
                                Width="40" MouseDown="Border_MouseDown" MouseUp="BorderStrokeSelectionClone_MouseUp">
                            <ikw:SimpleStackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                                <Image Source="{DynamicResource StrokeSelectionCloneIcon}"
                                       RenderOptions.BitmapScalingMode="HighQuality" Height="25" Width="25" />
                                <TextBlock Text="{x:Static props:MainWindowStrings.Main_ContextClone}" FontSize="10" Foreground="{DynamicResource FloatingBarForegroundBrush}"
                                           HorizontalAlignment="Center" />
                            </ikw:SimpleStackPanel>
                        </Border>
                        <Border Name="BorderStrokeSelectionCloneToNewBoard" Margin="0,2,-9,2" Background="Transparent"
                                CornerRadius="{Binding ElementName=BorderStrokeSelectionControl, Path=CornerRadius}"
                                Width="40" MouseDown="Border_MouseDown"
                                MouseUp="BorderStrokeSelectionCloneToNewBoard_MouseUp"
                                Visibility="{Binding Visibility, ElementName=GridBackgroundCover}">
                            <ikw:SimpleStackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                                <Image Source="{DynamicResource StrokeSelectionCloneToNewBoardIcon}"
                                       RenderOptions.BitmapScalingMode="HighQuality" Height="25" Width="25" />
                                <TextBlock Text="{x:Static props:MainWindowStrings.Main_ContextCloneToNewPage}" FontSize="8" Foreground="{DynamicResource FloatingBarForegroundBrush}"
                                           HorizontalAlignment="Center" />
                            </ikw:SimpleStackPanel>
                        </Border>
                        <Border Name="BorderStrokeSelectionInsertToWhiteboard" Margin="0,2,-9,2" Background="Transparent"
                                CornerRadius="{Binding ElementName=BorderStrokeSelectionControl, Path=CornerRadius}"
                                Width="40" MouseDown="Border_MouseDown"
                                MouseUp="BorderStrokeSelectionInsertToWhiteboard_MouseUp"
                                Visibility="{Binding Visibility, ElementName=GridBackgroundCover, Converter={StaticResource VisibilityConverter}}">
                            <ikw:SimpleStackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                                <Image Source="{DynamicResource QuickPanelBlackboardIcon}"
                                       RenderOptions.BitmapScalingMode="HighQuality" Height="25" Width="25" />
                                <TextBlock Text="{x:Static props:MainWindowStrings.Main_ContextInsertToWhiteboard}" FontSize="8" Foreground="{DynamicResource FloatingBarForegroundBrush}"
                                           HorizontalAlignment="Center" />
                            </ikw:SimpleStackPanel>
                        </Border>
                        <Border Width="1" Height="45" BorderBrush="{DynamicResource FloatingBarForegroundBrush}"
                                Background="{DynamicResource FloatingBarForegroundBrush}" />
                        <Border CornerRadius="{Binding ElementName=BorderStrokeSelectionControl, Path=CornerRadius}"
                                Height="40">
                            <ikw:SimpleStackPanel VerticalAlignment="Center" Spacing="5" Margin="0,-10">
                                <ikw:SimpleStackPanel Orientation="Horizontal" Spacing="10">
                                    <Image Source="{DynamicResource Rotate45DrawingImage}" Height="22"
                                           MouseDown="Border_MouseDown" MouseUp="ImageRotate45_MouseUp" />
                                    <Image Source="{DynamicResource Rotate90DrawingImage}" Height="22"
                                           MouseDown="Border_MouseDown" MouseUp="ImageRotate90_MouseUp" />
                                </ikw:SimpleStackPanel>
                                <TextBlock Text="{x:Static props:BoothStrings.Rotate}" FontSize="10" HorizontalAlignment="Center"
                                           Foreground="{DynamicResource FloatingBarForegroundBrush}" />
                            </ikw:SimpleStackPanel>
                        </Border>
                        <Border Width="1" Height="45" BorderBrush="{DynamicResource FloatingBarForegroundBrush}"
                                Background="{DynamicResource FloatingBarForegroundBrush}" />
                        <Border CornerRadius="{Binding ElementName=BorderStrokeSelectionControl, Path=CornerRadius}"
                                Height="40">
                            <ikw:SimpleStackPanel VerticalAlignment="Center" Margin="0,-10">
                                <ikw:SimpleStackPanel Orientation="Horizontal">
                                    <Image MouseDown="Border_MouseDown" MouseUp="ImageFlipHorizontal_MouseUp"
                                           Source="{DynamicResource StrokeSelectionFlipHorizontalIcon}"
                                           RenderOptions.BitmapScalingMode="HighQuality" Height="30" Width="30" />
                                    <Image MouseDown="Border_MouseDown" MouseUp="ImageFlipVertical_MouseUp"
                                           Source="{DynamicResource StrokeSelectionFlipVerticalIcon}"
                                           RenderOptions.BitmapScalingMode="HighQuality" Height="30" Width="30" />
                                </ikw:SimpleStackPanel>
                                <TextBlock Text="{x:Static props:MainWindowStrings.Main_ContextFlip}" FontSize="10" HorizontalAlignment="Center"
                                           Foreground="{DynamicResource FloatingBarForegroundBrush}" />
                            </ikw:SimpleStackPanel>
                        </Border>
                        <Border Width="1" Height="45" BorderBrush="{DynamicResource FloatingBarForegroundBrush}"
                                Background="{DynamicResource FloatingBarForegroundBrush}" />
                        <Border CornerRadius="{Binding ElementName=BorderStrokeSelectionControl, Path=CornerRadius}"
                                Height="40">
                            <ikw:SimpleStackPanel VerticalAlignment="Center" Spacing="5" Margin="0,-10">
                                <ikw:SimpleStackPanel Orientation="Horizontal" Spacing="5">
                                    <Grid MouseDown="Border_MouseDown" MouseUp="GridPenWidthDecrease_MouseUp">
                                        <Image Source="{DynamicResource StrokeSelectionPenWidthIcon}"
                                               RenderOptions.BitmapScalingMode="HighQuality" Height="25" Width="25" />
                                        <TextBlock Text="-" Foreground="{DynamicResource FloatingBarForegroundBrush}"
                                                   VerticalAlignment="Bottom" HorizontalAlignment="Right"
                                                   Margin="0,0,-2,-7" FontSize="15" />
                                    </Grid>
                                    <Grid MouseDown="Border_MouseDown" MouseUp="GridPenWidthIncrease_MouseUp">
                                        <Image Source="{DynamicResource StrokeSelectionPenWidthIcon}"
                                               RenderOptions.BitmapScalingMode="HighQuality" Height="25" Width="25" />
                                        <TextBlock Text="+" Foreground="{DynamicResource FloatingBarForegroundBrush}"
                                                   VerticalAlignment="Bottom" HorizontalAlignment="Right"
                                                   Margin="0,0,-3,-4" FontSize="11" />
                                    </Grid>
                                    <Grid MouseDown="Border_MouseDown" MouseUp="GridPenWidthRestore_MouseUp">
                                        <Image Source="{DynamicResource StrokeSelectionPenWidthIcon}"
                                               RenderOptions.BitmapScalingMode="HighQuality" Height="25" Width="25" />
                                        <Image Source="{DynamicResource AndroidRefreshDrawingImage}"
                                               VerticalAlignment="Bottom" HorizontalAlignment="Right"
                                               Margin="0,0,-2,-2" Width="8" />
                                    </Grid>
                                </ikw:SimpleStackPanel>
                                <TextBlock Text="{x:Static props:MainWindowStrings.Main_ContextBrushSize}" FontSize="10" HorizontalAlignment="Center"
                                           Foreground="{DynamicResource FloatingBarForegroundBrush}" />
                            </ikw:SimpleStackPanel>
                        </Border>
                        <Border Width="1" Height="45" BorderBrush="{DynamicResource FloatingBarForegroundBrush}"
                                Background="{DynamicResource FloatingBarForegroundBrush}" />
                        <Border Margin="-8,0,0,0"
                                CornerRadius="{Binding ElementName=BorderStrokeSelectionControl, Path=CornerRadius}"
                                Width="40" MouseDown="Border_MouseDown" MouseUp="BorderStrokeSelectionDelete_MouseUp">
                            <ikw:SimpleStackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                                <Image Source="{DynamicResource StrokeSelectionDeleteIcon}"
                                       RenderOptions.BitmapScalingMode="HighQuality" Height="25" Width="25" />
                                <TextBlock Margin="0,5,0,0" Text="{x:Static props:MainWindowStrings.Main_ContextDelete}" FontSize="10"
                                           Foreground="{DynamicResource FloatingBarForegroundBrush}"
                                           HorizontalAlignment="Center" />
                            </ikw:SimpleStackPanel>
                        </Border>
                    </ikw:SimpleStackPanel>
                </Viewbox>
            </Border>
            <!-- 图片选择工具栏 -->
            <Border Name="BorderImageSelectionControl"
                    HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,0,0,0"
                    CornerRadius="5" Height="80"
                    Background="{DynamicResource FloatingBarBackgroundBrush}"
                    Visibility="Collapsed"  d:Visibility="Visible"
                    BorderThickness="1" BorderBrush="{DynamicResource FloatingBarBorderBrush}">
                <Viewbox Margin="0,-2.5">
                    <ikw:SimpleStackPanel Orientation="Horizontal" Spacing="10" Height="60">
                        <Border Name="BorderImageClone" Margin="0,2,-9,2" Background="Transparent"
                                CornerRadius="{Binding ElementName=BorderImageSelectionControl, Path=CornerRadius}"
                                Width="40" MouseDown="Border_MouseDown" MouseUp="BorderImageClone_MouseUp">
                            <ikw:SimpleStackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                                <Image Source="{DynamicResource ImageSelectionCloneIcon}"
                                       RenderOptions.BitmapScalingMode="HighQuality" Height="25" Width="25" />
                                <TextBlock Text="{x:Static props:MainWindowStrings.Main_ContextClone}" FontSize="10" Foreground="{DynamicResource FloatingBarForegroundBrush}"
                                           HorizontalAlignment="Center" />
                            </ikw:SimpleStackPanel>
                        </Border>
                        <Border Name="BorderImageCloneToNewBoard"
                                Margin="0,2,-9,2"
                                Background="Transparent"
                                CornerRadius="{Binding ElementName=BorderImageSelectionControl, Path=CornerRadius}"
                                Width="40"
                                MouseDown="Border_MouseDown" 
                                MouseUp="BorderImageCloneToNewBoard_MouseUp"
                                Visibility="{Binding Visibility, ElementName=GridBackgroundCover}">
                            <ikw:SimpleStackPanel VerticalAlignment="Center"
                                                 HorizontalAlignment="Center">
                                <Image Source="{DynamicResource ImageSelectionCloneToNewBoardIcon}"
                                       RenderOptions.BitmapScalingMode="HighQuality"
                                       Height="25"
                                       Width="25" />
                                <TextBlock Text="{x:Static props:MainWindowStrings.Main_ContextCloneToNewPage}"
                                           FontSize="8"
                                           Foreground="{DynamicResource FloatingBarForegroundBrush}"
                                           HorizontalAlignment="Center" />
                            </ikw:SimpleStackPanel>
                        </Border>
                        <Border Width="1" 
                                Height="45" 
                                BorderBrush="{DynamicResource FloatingBarForegroundBrush}"
                                Background="{DynamicResource FloatingBarForegroundBrush}" />
                        <Border CornerRadius="{Binding ElementName=BorderImageSelectionControl, Path=CornerRadius}"
                                Height="40">
                            <ikw:SimpleStackPanel VerticalAlignment="Center" 
                                                 Spacing="5" 
                                                 Margin="0,-10">
                                <ikw:SimpleStackPanel Orientation="Horizontal"
                                                     Spacing="10">
                                    <Image Source="{DynamicResource Rotate45DrawingImage}"
                                           Height="22"
                                           MouseDown="Border_MouseDown"
                                           MouseUp="BorderImageRotateLeft_MouseUp" />
                                    <Image Source="{DynamicResource Rotate90DrawingImage}"
                                           Height="22"
                                           MouseDown="Border_MouseDown"
                                           MouseUp="BorderImageRotateRight_MouseUp" />
                                </ikw:SimpleStackPanel>
                                <TextBlock Text="{x:Static props:BoothStrings.Rotate}"
                                           FontSize="10"
                                           HorizontalAlignment="Center"
                                           Foreground="{DynamicResource FloatingBarForegroundBrush}" />
                            </ikw:SimpleStackPanel>
                        </Border>
                        <Border Width="1" Height="45" BorderBrush="{DynamicResource FloatingBarForegroundBrush}"
                                Background="{DynamicResource FloatingBarForegroundBrush}" />
                        <Border CornerRadius="{Binding ElementName=BorderImageSelectionControl, Path=CornerRadius}"
                                Height="40">
                            <ikw:SimpleStackPanel VerticalAlignment="Center" Spacing="5" Margin="0,-10">
                                <ikw:SimpleStackPanel Orientation="Horizontal" Spacing="10">
                                    <Grid MouseDown="Border_MouseDown" MouseUp="GridImageScaleDecrease_MouseUp">
                                        <Image Source="{DynamicResource ImageSelectionScaleIcon1}"
                                               RenderOptions.BitmapScalingMode="HighQuality" Height="25" Width="25" />
                                        <TextBlock Text="-" Foreground="{DynamicResource FloatingBarForegroundBrush}"
                                                   VerticalAlignment="Bottom" HorizontalAlignment="Right"
                                                   Margin="0,0,-2,-7" FontSize="15" />
                                    </Grid>
                                    <Grid MouseDown="Border_MouseDown" MouseUp="GridImageScaleIncrease_MouseUp">
                                        <Image Source="{DynamicResource ImageSelectionScaleIcon2}"
                                               RenderOptions.BitmapScalingMode="HighQuality" Height="25" Width="25" />
                                        <TextBlock Text="+" Foreground="{DynamicResource FloatingBarForegroundBrush}"
                                                   VerticalAlignment="Bottom" HorizontalAlignment="Right"
                                                   Margin="0,0,-3,-4" FontSize="11" />
                                    </Grid>
                                </ikw:SimpleStackPanel>
                                <TextBlock Text="{x:Static props:MainWindowStrings.Main_ContextZoom}" FontSize="10" HorizontalAlignment="Center"
                                           Foreground="{DynamicResource FloatingBarForegroundBrush}" />
                            </ikw:SimpleStackPanel>
                        </Border>
                        <Border Width="1" Height="45" BorderBrush="{DynamicResource FloatingBarForegroundBrush}"
                                Background="{DynamicResource FloatingBarForegroundBrush}" />
                        <Border Margin="-8,0,0,0"
                                CornerRadius="{Binding ElementName=BorderImageSelectionControl, Path=CornerRadius}"
                                Width="40" MouseDown="Border_MouseDown" MouseUp="BorderImageDelete_MouseUp">
                            <ikw:SimpleStackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
                                <Image Source="{DynamicResource ImageSelectionDeleteIcon}"
                                       RenderOptions.BitmapScalingMode="HighQuality" Height="25" Width="25" />
                                <TextBlock Margin="0,5,0,0" Text="{x:Static props:MainWindowStrings.Main_ContextDelete}" FontSize="10"
                                           Foreground="{DynamicResource FloatingBarForegroundBrush}"
                                           HorizontalAlignment="Center" />
                            </ikw:SimpleStackPanel>
                        </Border>
                    </ikw:SimpleStackPanel>
                </Viewbox>
            </Border>

            <Border Name="BorderPdfPageSidebar"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Top"
                    Margin="0,0,0,0"
                    Width="64"
                    CornerRadius="8"
                    Background="{DynamicResource FloatingBarBackgroundBrush}"
                    BorderBrush="#33FFFFFF"
                    BorderThickness="1"
                    SnapsToDevicePixels="True"
                    Visibility="Collapsed"  d:Visibility="Visible"
                    Panel.ZIndex="1001"
                    ui:ThemeManager.RequestedTheme="Dark">
                <Border.Effect>
                    <DropShadowEffect BlurRadius="24"
                                      ShadowDepth="3"
                                      Direction="270"
                                      Opacity="0.45"
                                      Color="#000000" />
                </Border.Effect>
                <Border.Resources>
                    <Style x:Key="PdfSidebarNavButtonStyle" TargetType="Border">
                        <Setter Property="Width" Value="40" />
                        <Setter Property="Height" Value="36" />
                        <Setter Property="CornerRadius" Value="4" />
                        <Setter Property="BorderThickness" Value="0" />
                        <Setter Property="Cursor" Value="Hand" />
                        <Setter Property="SnapsToDevicePixels" Value="True" />
                        <Setter Property="Background" Value="Transparent" />
                        <Style.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter Property="Background">
                                    <Setter.Value>
                                        <SolidColorBrush Color="#FFFFFF" Opacity="0.08" />
                                    </Setter.Value>
                                </Setter>
                            </Trigger>
                        </Style.Triggers>
                    </Style>
                </Border.Resources>
                <Grid>
                    <ikw:SimpleStackPanel VerticalAlignment="Center"
                                         HorizontalAlignment="Center"
                                         Spacing="8"
                                         Margin="0,10,0,10">
                        <TextBlock Text="PDF"
                                   FontSize="10"
                                   FontWeight="SemiBold"
                                   HorizontalAlignment="Center"
                                   Foreground="{DynamicResource FloatingBarForegroundBrush}"
                                   Opacity="0.78" />
                        <Border CornerRadius="4"
                                Padding="8,6"
                                BorderThickness="0"
                                SnapsToDevicePixels="True"
                                Background="#14FFFFFF">
                            <TextBlock Name="TextBlockPdfSidebarPageLabel"
                                       Text="— / —"
                                       FontSize="12"
                                       FontWeight="SemiBold"
                                       VerticalAlignment="Center"
                                       HorizontalAlignment="Center"
                                       TextAlignment="Center"
                                       Foreground="{DynamicResource FloatingBarForegroundBrush}"
                                       Opacity="0.55" />
                        </Border>
                        <Border Name="BorderPdfSidebarPagePrev"
                                Style="{StaticResource PdfSidebarNavButtonStyle}"
                                Opacity="0.35"
                                IsHitTestVisible="False"
                                ToolTip="{x:Static props:FloatingBarStrings.Board_PreviousPage}"
                                MouseDown="Border_MouseDown"
                                MouseUp="BorderPdfSidebarPagePrev_MouseUp">
                            <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.ChevronLeft}"
                                         FontSize="14"
                                         HorizontalAlignment="Center"
                                         VerticalAlignment="Center"
                                         Foreground="{DynamicResource FloatingBarForegroundBrush}" />
                        </Border>
                        <Border Name="BorderPdfSidebarPageNext"
                                Style="{StaticResource PdfSidebarNavButtonStyle}"
                                Opacity="0.35"
                                IsHitTestVisible="False"
                                ToolTip="{x:Static props:FloatingBarStrings.Board_NextPage}"
                                MouseDown="Border_MouseDown"
                                MouseUp="BorderPdfSidebarPageNext_MouseUp">
                            <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.ChevronRight}"
                                         FontSize="14"
                                         HorizontalAlignment="Center"
                                         VerticalAlignment="Center"
                                         Foreground="{DynamicResource FloatingBarForegroundBrush}" />
                        </Border>
                        <TextBlock Text="{x:Static props:MainWindowStrings.Main_ContextPageTurn}"
                                   FontSize="9"
                                   HorizontalAlignment="Center"
                                   Foreground="{DynamicResource FloatingBarForegroundBrush}"
                                   Opacity="0.55" />
                    </ikw:SimpleStackPanel>
                </Grid>
            </Border>

            <!-- 图片选择覆盖层（缩放/移动/旋转） -->
            <localControls:ImageSelectionOverlay x:Name="ImageSelectionOverlay"
                                            Visibility="Collapsed"  d:Visibility="Visible"
                                            Panel.ZIndex="1000" />

        </Grid>
        <Grid Visibility="Collapsed"  d:Visibility="Visible">
            <Grid Visibility="{Binding ElementName=GridBackgroundCoverHolder, Path=Visibility}" d:Visibility="Visible">
                <Viewbox Margin="10" Height="50" HorizontalAlignment="Right" VerticalAlignment="Bottom">
                    <ikw:SimpleStackPanel Orientation="Horizontal" Spacing="5">
                        <Border Width="36" Height="36" CornerRadius="5"
                                Background="{DynamicResource FloatingBarBackgroundBrush}" BorderThickness="1" d:BorderBrush="Red" d:Background="Green"
                                BorderBrush="{DynamicResource FloatingBarBorderBrush}">
                            <Grid Margin="6" MouseUp="GridPPTControlPrevious_MouseUp">
                                <Image
                                    Source="{DynamicResource ResourceKey=SeewoImageSource.HorizontalPreviousSlideNormal}" />
                            </Grid>
                        </Border>
                        <Border Visibility="{Binding ElementName=PPTNavigationBtn, Path=Visibility}" Width="36"
                                Height="36" CornerRadius="5" Background="{DynamicResource FloatingBarBackgroundBrush}" d:BorderBrush="Red" d:Background="Green"
                                BorderThickness="1" BorderBrush="{DynamicResource FloatingBarBorderBrush}">
                            <Grid MouseUp="PPTNavigationBtn_MouseUp">
                                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"
                                           Foreground="{Binding ElementName=PPTNavigationTextBlock, Path=Foreground}"
                                           FontSize="{Binding ElementName=PPTNavigationTextBlock, Path=FontSize}"
                                           Text="{Binding ElementName=PPTNavigationTextBlock, Path=Text}" />
                            </Grid>
                        </Border>
                        <Border Width="36" Height="36" CornerRadius="5"
                                Background="{DynamicResource FloatingBarBackgroundBrush}" BorderThickness="1" d:BorderBrush="Red" d:Background="Green"
                                BorderBrush="{DynamicResource FloatingBarBorderBrush}">
                            <Grid Margin="6" MouseUp="GridPPTControlNext_MouseUp">
                                <Image
                                    Source="{DynamicResource ResourceKey=SeewoImageSource.HorizontalNextSlideNormal}" />
                            </Grid>
                        </Border>
                    </ikw:SimpleStackPanel>
                </Viewbox>
            </Grid>
        </Grid>
        <!--白板-->
        <Grid Name="BlackboardUIGridForInkReplay">
            <Grid Visibility="{Binding ElementName=GridBackgroundCoverHolder, Path=Visibility}">
                <!-- 左下角 -->
                <Viewbox x:Name="ViewboxBlackboardLeftSide" Margin="3,0,0,0" Height="55" HorizontalAlignment="Left"
                         VerticalAlignment="Bottom"
                         Stretch="None">
                    <Viewbox.LayoutTransform>
                        <ScaleTransform x:Name="ViewboxBlackboardLeftSideScaleTransform" ScaleX="1" ScaleY="1" />
                    </Viewbox.LayoutTransform>
                    <Grid Name="BlackboardLeftSide" Visibility="Collapsed" d:Visibility="Visible" Margin="0,0,0,3" Height="50"
                          HorizontalAlignment="Center" VerticalAlignment="Bottom">
                        <ikw:SimpleStackPanel x:Name="BlackboardLeftSidePanel" Orientation="Horizontal">
                            <!-- 白板左下角导航将由 BoardToolbarRegistry 动态构建 -->
                        </ikw:SimpleStackPanel>
                    </Grid>
                </Viewbox>
                <!-- 中间 -->
                <Viewbox x:Name="ViewboxBlackboardCenterSide" Margin="3,0,0,0" Height="56" HorizontalAlignment="Center"
                         VerticalAlignment="Bottom"
                         Stretch="None">
                    <Viewbox.LayoutTransform>
                        <ScaleTransform x:Name="ViewboxBlackboardCenterSideScaleTransform" ScaleX="1" ScaleY="1" />
                    </Viewbox.LayoutTransform>
                    <Grid x:Name="BlackboardCenterSide" Visibility="Collapsed"  d:Visibility="Visible" Margin="0,0,0,3" Height="50"
                          HorizontalAlignment="Center" VerticalAlignment="Bottom">
                        <ikw:SimpleStackPanel x:Name="BlackboardCenterSidePanel" Orientation="Horizontal">
                            <!-- 白板工具栏按钮将由 BoardToolbarRegistry 动态构建 -->
                        </ikw:SimpleStackPanel>
                    </Grid>
                </Viewbox>
                <!--菜单-->
                <Grid d:Visibility="Collapsed">
                    <!--手势菜单-->
                    <Popup x:Name="BoardTwoFingerGestureBorder" Placement="Custom" AllowsTransparency="True" StaysOpen="True" IsOpen="False">
                        <localControls:GesturePopupContent x:Name="BoardGesturePopupContent" />
                    </Popup>
                    <!--漫游导航-->
                    <Popup x:Name="BoardRoamingPopup" Placement="Custom" AllowsTransparency="True" StaysOpen="True" IsOpen="False">
                        <localControls:BoardRoamingPopupContent x:Name="BoardRoamingPopupContent" />
                    </Popup>
                    <!--视频展台菜单：摄像头设备 / 分辨率 / 4 个操作按钮（矫正、拍照、旋转、关闭）-->
                    <Popup x:Name="BoothPopup" Placement="Custom" AllowsTransparency="True" StaysOpen="True" IsOpen="False">
                        <localControls:BoothPopupContent x:Name="BoothPopupContent" />
                    </Popup>
                    <!--背景菜单-->
                    <Popup x:Name="BackgroundPalette" Placement="Custom" AllowsTransparency="True" StaysOpen="True" IsOpen="False">
                        <localControls:BackgroundPalettePopupContent x:Name="BackgroundPalettePopupContent" />
                    </Popup>
                    <!--批注菜单-->
                    <Popup x:Name="BoardPenPalette" Placement="Custom" AllowsTransparency="True" StaysOpen="True" IsOpen="False">
                        <localControls:PenPalettePopupContent x:Name="BoardPenPalettePopupContent" />
                    </Popup>
                    <!--橡皮菜单-->
                    <Popup x:Name="BoardEraserSizePanel" Placement="Custom" AllowsTransparency="True" StaysOpen="True" IsOpen="False">
                        <localControls:EraserPopupContent x:Name="BoardEraserPopupContent" IsBoardMode="True" />
                    </Popup>
                    <!--图形菜单-->
                    <Popup x:Name="BoardBorderDrawShape" Placement="Custom" AllowsTransparency="True" StaysOpen="True" IsOpen="False">
                        <localControls:ShapeDrawPopupContent x:Name="BoardShapeDrawPopupContent" />
                    </Popup>
                    <!--插入图片菜单-->
                    <Popup x:Name="BoardImageOptionsPanel" Placement="Custom" AllowsTransparency="True" StaysOpen="True" IsOpen="False">
                        <localControls:ImageOptionsPopupContent x:Name="BoardImageOptionsPopupContent" />
                    </Popup>
                    <!--工具菜单-->
                    <Popup x:Name="BoardBorderToolsPopup" Placement="Custom" AllowsTransparency="True" StaysOpen="True" IsOpen="False">
                        <localControls:BoardToolsPopupContent x:Name="BoardToolsPopupContent" />
                    </Popup>
                </Grid>
                <!-- 右下角 -->
                <Viewbox x:Name="ViewboxBlackboardRightSide" Margin="3,0,0,0" Height="55"
                         HorizontalAlignment="Right" VerticalAlignment="Bottom"
                         Stretch="None">
                    <Viewbox.LayoutTransform>
                        <ScaleTransform x:Name="ViewboxBlackboardRightSideScaleTransform" ScaleX="1" ScaleY="1" />
                    </Viewbox.LayoutTransform>
                    <Grid Name="BlackboardRightSide" Visibility="Collapsed"  d:Visibility="Visible" Margin="0,0,0,3" Height="50"
                          HorizontalAlignment="Center" VerticalAlignment="Bottom">
                        <ikw:SimpleStackPanel x:Name="BlackboardRightSidePanel" Orientation="Horizontal">
                            <!-- 白板右下角导航将由 BoardToolbarRegistry 动态构建 -->
                        </ikw:SimpleStackPanel>
                    </Grid>
                </Viewbox>

                <ikw:SimpleStackPanel Spacing="10" Orientation="Horizontal"
                                     VerticalAlignment="Bottom"
                                     HorizontalAlignment="Right"
                                     Height="50" Margin="10" d:Margin="10,10,10,60"
                                     Visibility="Collapsed"  d:Visibility="Visible">
                    <Button Name="BtnWhiteBoardAdd"
                            Width="50" Height="48" FontSize="26" Click="BtnWhiteBoardAdd_Click"
                            Foreground="{DynamicResource FloatingBarForegroundBrush}"
                            Background="{DynamicResource FloatingBarBackgroundBrush}">
                        <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Add}" />
                    </Button>
                    <Button Name="BtnWhiteBoardSwitchPrevious" FontFamily="Symbol"
                            Width="50" Height="48" FontSize="25" Click="BtnWhiteBoardSwitchPrevious_Click"
                            Foreground="{DynamicResource FloatingBarForegroundBrush}"
                            Background="{DynamicResource FloatingBarBackgroundBrush}"
                            VerticalContentAlignment="Center"
                            IsEnabled="False" IsEnabledChanged="Btn_IsEnabledChanged">
                        <Image RenderTransformOrigin="0.5,0.5" Opacity="0.25">
                            <Image.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform />
                                    <SkewTransform />
                                    <RotateTransform Angle="-90" />
                                    <TranslateTransform />
                                </TransformGroup>
                            </Image.RenderTransform>
                            <Image.Source>
                                <DrawingImage>
                                    <DrawingImage.Drawing>
                                        <DrawingGroup ClipGeometry="M0,0 V64 H64 V0 H0 Z">
                                            <DrawingGroup Opacity="1">
                                                <GeometryDrawing Brush="{DynamicResource FloatingBarForegroundBrush}"
                                                                 Geometry="F1 M64,64z M0,0z M32,26.41L16.566,41.844 14.439,39.717 32,22.156 49.561,39.717 47.434,41.844 32,26.41z" />
                                            </DrawingGroup>
                                        </DrawingGroup>
                                    </DrawingImage.Drawing>
                                </DrawingImage>
                            </Image.Source>
                        </Image>
                    </Button>
                    <Border Height="48" CornerRadius="2" Margin="3,0">
                        <TextBlock Name="TextBlockWhiteBoardIndexInfo"
                                   Text="1/1"
                                   Foreground="{DynamicResource FloatingBarForegroundBrush}"
                                   VerticalAlignment="Center" HorizontalAlignment="Center"
                                  
                                   FontSize="18" />
                    </Border>
                    <Button Name="BtnWhiteBoardSwitchNext" FontFamily="Symbol"
                            Width="50" Height="48" FontSize="25" Click="BtnWhiteBoardSwitchNext_Click"
                            Foreground="{DynamicResource FloatingBarForegroundBrush}"
                            Background="{DynamicResource FloatingBarBackgroundBrush}"
                            VerticalContentAlignment="Center"
                            IsEnabled="True" IsEnabledChanged="Btn_IsEnabledChanged">
                        <Image RenderTransformOrigin="0.5,0.5" Opacity="0.25">
                            <Image.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform />
                                    <SkewTransform />
                                    <RotateTransform Angle="90" />
                                    <TranslateTransform />
                                </TransformGroup>
                            </Image.RenderTransform>
                            <Image.Source>
                                <DrawingImage>
                                    <DrawingImage.Drawing>
                                        <DrawingGroup ClipGeometry="M0,0 V64 H64 V0 H0 Z">
                                            <DrawingGroup Opacity="1">
                                                <GeometryDrawing Brush="{DynamicResource FloatingBarForegroundBrush}"
                                                                 Geometry="F1 M64,64z M0,0z M32,26.41L16.566,41.844 14.439,39.717 32,22.156 49.561,39.717 47.434,41.844 32,26.41z" />
                                            </DrawingGroup>
                                        </DrawingGroup>
                                    </DrawingImage.Drawing>
                                </DrawingImage>
                            </Image.Source>
                        </Image>
                    </Button>
                    <Button Name="BtnWhiteBoardDelete" Click="BtnWhiteBoardDelete_Click"
                            Width="50" Height="48" FontSize="26"
                            Foreground="{DynamicResource FloatingBarForegroundBrush}"
                            Background="{DynamicResource FloatingBarBackgroundBrush}"
                            IsEnabled="False">
                        <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Delete}" />
                    </Button>
                </ikw:SimpleStackPanel>
            </Grid>
        </Grid>
        <!--通知弹窗-->
        <Grid Name="GridNotifications" Margin="0,110" Visibility="Collapsed"  d:Visibility="Visible" HorizontalAlignment="Center"
              VerticalAlignment="Bottom">
            <ui:InfoBar x:Name="NotificationInfoBar"
                        IsOpen="True"
                        IsClosable="False"
                        Severity="Warning"
                        Title="{x:Static props:NotificationStrings.Type_Reminder}"
                        MaxWidth="900"
                        Message="{Binding Text, ElementName=TextBlockNotice}" />
            <TextBlock x:Name="TextBlockNotice" Visibility="Collapsed"  d:Visibility="Visible"
                       Text="{x:Static props:NotificationStrings.TestText}" />
        </Grid>
        <!--// PPT 底部翻页按钮 //-->
        <Grid d:Visibility="Collapsed">
            <Grid Visibility="Visible" d:Visibility="Collapsed">
                <localControls:PPTNavBar x:Name="LeftBottomPanelForPPTNavigation"
                                         Visibility="Collapsed"  d:Visibility="Visible"
                                         Direction="LeftBottom"
                                         Margin="6,0,0,6"
                                         HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
                <localControls:PPTNavBar x:Name="RightBottomPanelForPPTNavigation"
                                         Visibility="Collapsed"  d:Visibility="Visible"
                                         Direction="RightBottom"
                                         Margin="0,0,6,6"
                                         HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
            </Grid>
        </Grid>
        <!-- 隐藏的全局页码源:旧代码与 PPTUIManager 通过 PPTBtnPageNow/Total 设置文字 -->
        <ikw:SimpleStackPanel Visibility="Collapsed">
            <TextBlock Name="PPTBtnPageNow" Text="?"/>
            <TextBlock Name="PPTBtnPageTotal" Text="/ ?"/>
        </ikw:SimpleStackPanel>
        <!--PPT侧边翻页按钮//左-->
        <localControls:PPTNavBar x:Name="LeftSidePanelForPPTNavigation"
                                 Visibility="Collapsed"  d:Visibility="Visible"
                                 Direction="LeftSide"
                                 Margin="6,0,0,0"
                                 HorizontalAlignment="Left" VerticalAlignment="Center"/>
        <!--PPT侧边翻页按钮//右-->
        <localControls:PPTNavBar x:Name="RightSidePanelForPPTNavigation"
                                 Visibility="Collapsed"  d:Visibility="Visible"
                                 Direction="RightSide"
                                 Margin="0,0,6,0"
                                 HorizontalAlignment="Right" VerticalAlignment="Center"/>
        <!--浮动工具栏-->
        <Grid Name="FloatingbarUIForInkReplay" d:Visibility="Collapsed">
            <Viewbox Name="ViewboxFloatingBar" Margin="-500,0,0,0" Cursor="Arrow"
                     Visibility="Collapsed"  d:Visibility="Visible"
                     HorizontalAlignment="Left" VerticalAlignment="Top"
                     Stretch="None"
                     UseLayoutRounding="True" SnapsToDevicePixels="True"
                     RenderTransformOrigin="0.5,0.5">
                <Viewbox.LayoutTransform>
                    <ScaleTransform x:Name="ViewboxFloatingBarScaleTransform" ScaleX="1" ScaleY="1" />
                </Viewbox.LayoutTransform>
                <Grid Name="GridFloatingBarContainer">
                    <ikw:SimpleStackPanel Name="StackPanelFloatingBarRoot" Orientation="Horizontal" >
                        <Border Name="BorderFloatingBarMoveControls" Margin="0" Padding="0"
                                Width="58" Height="58"
                                Background="{DynamicResource FloatingBarBackgroundBrush}"
                                CornerRadius="8"
                                BorderThickness="2"
                                BorderBrush="{DynamicResource FloatingBarBorderBrush}"
                                MouseDown="SymbolIconEmoji_MouseDown"
                                MouseUp="SymbolIconEmoji_MouseUp">
                            <Image Name="FloatingbarHeadIconImg" Margin="0.5"
                                   SnapsToDevicePixels="True"
                                   HorizontalAlignment="Center" VerticalAlignment="Center"
                                   RenderOptions.BitmapScalingMode="HighQuality" />
                        </Border>
                    </ikw:SimpleStackPanel>
                    <Canvas Name="CanvasFloatingBarSelection" IsHitTestVisible="False">
                        <Border Name="SelectionBGFloatingBar"
                                Visibility="Hidden"
                                Width="44" Height="43"
                                CornerRadius="4"
                                Background="#303B82F6"
                                Canvas.Left="0" Canvas.Top="0" />
                        <Border Name="IndicatorBarFloatingBar"
                                Visibility="Hidden"
                                Width="16" Height="3"
                                CornerRadius="2"
                                Background="#2563EB"
                                Canvas.Left="14" Canvas.Bottom="2" />
                    </Canvas>
                </Grid>
            </Viewbox>
            <!-- Issue #285 更小批注栏：闲置状态下替代浮动栏的紧凑圆角批注栏，可自动吸边 -->
            <Border Name="IdleMiniBar"
                    Visibility="Collapsed" d:Visibility="Visible"
                    HorizontalAlignment="Left" VerticalAlignment="Top"
                    Margin="-500,0,0,0"
                    Height="44" MinWidth="44"
                    CornerRadius="22"
                    Padding="6,0"
                    Cursor="Arrow"
                    Background="{DynamicResource FloatingBarBackgroundBrush}"
                    BorderBrush="{DynamicResource FloatingBarBorderBrush}"
                    BorderThickness="1"
                    Opacity="0.5"
                    MouseDown="IdleMiniBar_MouseDown"
                    MouseMove="IdleMiniBar_MouseMove"
                    MouseUp="IdleMiniBar_MouseUp"
                    MouseEnter="IdleMiniBar_MouseEnter"
                    MouseLeave="IdleMiniBar_MouseLeave">
                <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                    <!-- 深度贴边收起后仅显示的展开按钮 -->
                    <Button Name="IdleMiniBarExpandButton"
                            Visibility="Collapsed"
                            Width="32" Height="32" Padding="0" Margin="0"
                            Background="Transparent" BorderThickness="0"
                            ToolTip="{x:Static props:FloatingBarStrings.IdleMiniBar_Expand}"
                            Click="IdleMiniBarExpand_Click">
                        <ui:FontIcon Name="IdleMiniBarExpandIcon" Icon="{x:Static ui:SegoeFluentIcons.ChevronRight}" FontSize="16" />
                    </Button>
                    <!-- 常规内容 -->
                    <StackPanel Name="IdleMiniBarButtons" Orientation="Horizontal" VerticalAlignment="Center">
                        <Button Name="IdleMiniBarAnnotateButton"
                                Height="34" Padding="10,0" Margin="0"
                                Background="Transparent" BorderThickness="0"
                                Click="IdleMiniBarAnnotate_Click">
                            <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                                <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Edit}" FontSize="15" />
                                <TextBlock Name="IdleMiniBarAnnotateText" Margin="6,0,0,0"
                                           VerticalAlignment="Center" FontSize="13"
                                           Text="{x:Static props:FloatingBarStrings.IdleMiniBar_StartAnnotate}" />
                            </StackPanel>
                        </Button>
                        <Button Name="IdleMiniBarClearButton"
                                Visibility="Collapsed"
                                Width="34" Height="34" Padding="0" Margin="2,0,0,0"
                                Background="Transparent" BorderThickness="0"
                                ToolTip="{x:Static props:FloatingBarStrings.IdleMiniBar_ClearPage}"
                                Click="IdleMiniBarClear_Click">
                            <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Delete}" FontSize="15" />
                        </Button>
                        <Border Width="1" Height="20" Margin="4,0" VerticalAlignment="Center"
                                Background="{DynamicResource FloatingBarBorderBrush}" Opacity="0.5" />
                        <Button Name="IdleMiniBarWhiteboardButton"
                                Width="34" Height="34" Padding="0" Margin="0"
                                Background="Transparent" BorderThickness="0"
                                ToolTip="{x:Static props:FloatingBarStrings.IdleMiniBar_Whiteboard}"
                                Click="IdleMiniBarWhiteboard_Click">
                            <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Draw}" FontSize="15" />
                        </Button>
                        <Button Name="IdleMiniBarMoreButton"
                                Width="34" Height="34" Padding="0" Margin="2,0,0,0"
                                Background="Transparent" BorderThickness="0"
                                ToolTip="{x:Static props:FloatingBarStrings.IdleMiniBar_More}"
                                Click="IdleMiniBarMore_Click">
                            <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.More}" FontSize="15" />
                        </Button>
                    </StackPanel>
                </StackPanel>
            </Border>
        </Grid>
        <!--浮动工具栏菜单-->
        <Grid d:Visibility="Collapsed">
            <Popup x:Name="PenPalette" Placement="Custom" AllowsTransparency="True" StaysOpen="True" IsOpen="False">
                <localControls:PenPalettePopupContent x:Name="PenPalettePopupContent" />
            </Popup>
            <Popup x:Name="EraserSizePanel" Placement="Custom" AllowsTransparency="True" StaysOpen="True" IsOpen="False">
                <localControls:EraserPopupContent x:Name="EraserPopupContent" />
            </Popup>
            <Popup x:Name="BorderTools" Placement="Custom" AllowsTransparency="True" StaysOpen="True" IsOpen="False">
                <localControls:FloatingBarToolsPopupContent x:Name="MainToolsPopupContent" />
            </Popup>
            <Popup x:Name="BorderDrawShape" Placement="Custom" AllowsTransparency="True" StaysOpen="True" IsOpen="False">
                <localControls:ShapeDrawPopupContent x:Name="ShapeDrawPopupContent" />
            </Popup>
            <Popup x:Name="TwoFingerGestureBorder" Placement="Custom" AllowsTransparency="True" StaysOpen="True" IsOpen="False">
                <localControls:GesturePopupContent x:Name="FloatingBarGesturePopupContent" />
            </Popup>
            <!--白板按钮右键二级菜单-->
            <Popup x:Name="WhiteboardModeSelectionPopup" Placement="Custom" AllowsTransparency="True" StaysOpen="True" IsOpen="False">
                <localControls:WhiteboardModeSelectionPopupContent x:Name="WhiteboardModeSelectionContent" />
            </Popup>
            <!--墨迹选择栏：插入白板目标选择菜单-->
            <Popup x:Name="InsertToWhiteboardPopup" Placement="Custom" AllowsTransparency="True" StaysOpen="True" IsOpen="False">
                <localControls:WhiteboardModeSelectionPopupContent x:Name="InsertToWhiteboardContent" />
            </Popup>
        </Grid>
        <Grid Name="GridForFloatingBarDraging" Background="#01000000" Visibility="Collapsed"
              MouseMove="SymbolIconEmoji_MouseMove" MouseUp="SymbolIconEmoji_MouseUp" />
        <!--墨迹重播-->
        <Grid d:Visibility="Collapsed">
            <InkCanvas Name="InkCanvasForInkReplay" MouseDown="InkCanvasForInkReplay_MouseDown" Visibility="Collapsed"
                       EditingMode="None" Background="Transparent" />
            <Border Name="BorderInkReplayToolBox" Width="386" Height="48" HorizontalAlignment="Center"
                    Visibility="Collapsed"  d:Visibility="Visible"
                    VerticalAlignment="Bottom" Margin="0,0,0,16" Background="{DynamicResource FloatingBarBackgroundBrush}" CornerRadius="5"
                    BorderBrush="#a1a1aa" BorderThickness="1">
                <ikw:SimpleStackPanel Orientation="Horizontal">
                    <Border CornerRadius="5,0,0,5" Margin="-1" Padding="12" Background="#b91c1c">
                        <ikw:SimpleStackPanel Orientation="Horizontal">
                            <Image Width="24" Height="24">
                                <Image.Source>
                                    <DrawingImage>
                                        <DrawingImage.Drawing>
                                            <DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
                                                <GeometryDrawing Brush="White"
                                                                 Geometry="F0 M24,24z M0,0z M10.4679,3.29578C12.1914,3.08179 13.9385,3.41707 15.4604,4.25385 16.9822,5.09064 18.2013,6.38627 18.9439,7.95624 19.6865,9.5262 19.9148,11.2905 19.5963,12.9977 19.4919,13.5577 19.8611,14.0964 20.4211,14.2009 20.9811,14.3053 21.5198,13.936 21.6243,13.376 22.0224,11.2419 21.737,9.03662 20.8087,7.07416 19.8804,5.1117 18.3566,3.49216 16.4543,2.44618 14.552,1.4002 12.3681,0.981105 10.2138,1.24858 8.05937,1.51606 6.0443,2.45648 4.45553,3.9359 2.86675,5.41533 1.78526,7.35833 1.36509,9.4882 0.944914,11.6181 1.20747,13.8262 2.11537,15.7982 3.02327,17.7701 4.53022,19.4054 6.42161,20.471 8.31301,21.5366 10.4924,21.9783 12.6494,21.7331 13.2155,21.6688 13.6221,21.1578 13.5578,20.5918 13.4935,20.0258 12.9825,19.6191 12.4165,19.6834 10.6908,19.8795 8.94733,19.5262 7.43421,18.6737 5.9211,17.8212 4.71554,16.513 3.98922,14.9355 3.2629,13.3579 3.05285,11.5914 3.38899,9.88747 3.72513,8.18357 4.59032,6.62917 5.86134,5.44563 7.13237,4.26209 8.74442,3.50976 10.4679,3.29578z M11.484,5.29524C12.0536,5.29524,12.5154,5.75704,12.5154,6.32669L12.5154,11.0567 14.2762,12.8175C14.679,13.2203 14.679,13.8734 14.2762,14.2762 13.8734,14.679 13.2203,14.679 12.8175,14.2762L10.7546,12.2133C10.5612,12.0199,10.4525,11.7575,10.4525,11.484L10.4525,6.32669C10.4525,5.75704,10.9143,5.29524,11.484,5.29524z M17.1719,14.7253C16.8533,14.5341 16.4564,14.5291 16.133,14.7122 15.8097,14.8953 15.6098,15.2382 15.6098,15.6098L15.6098,21.7985C15.6098,22.1701 15.8097,22.513 16.133,22.6961 16.4564,22.8792 16.8533,22.8742 17.1719,22.683L22.3292,19.5886C22.6399,19.4022 22.83,19.0665 22.83,18.7042 22.83,18.3418 22.6399,18.0061 22.3292,17.8197L17.1719,14.7253z" />
                                            </DrawingGroup>
                                        </DrawingImage.Drawing>
                                    </DrawingImage>
                                </Image.Source>
                            </Image>
                        </ikw:SimpleStackPanel>
                    </Border>
                    <StackPanel Width="128" Orientation="Vertical" VerticalAlignment="Center" Margin="8,0,0,0">
                        <TextBlock Name="InkReplayPanelStatusText" FontSize="17" FontWeight="Bold" Foreground="#b91c1c"
                                   Text="{x:Static props:MainWindowStrings.Main_InkReplayPlaying}" VerticalAlignment="Center" />
                        <TextBlock FontSize="12" Foreground="#b91c1c" Text="{x:Static props:MainWindowStrings.Main_InkReplayExitHint}" VerticalAlignment="Center" />
                    </StackPanel>
                    <ikw:SimpleStackPanel Orientation="Horizontal" Margin="9,0,0,0" Spacing="6">
                        <Border Name="InkReplayPlayPauseBorder" MouseDown="InkReplayPlayPauseBorder_OnMouseDown"
                                MouseUp="InkReplayPlayPauseBorder_OnMouseUp" CornerRadius="16" Height="32" Width="32">
                            <Grid>
                                <Image Name="InkReplayPlayButtonImage" Visibility="Collapsed"  d:Visibility="Visible" Width="18" Height="18"
                                       Margin="2,0,0,0">
                                    <Image.Source>
                                        <DrawingImage>
                                            <DrawingImage.Drawing>
                                                <DrawingGroup ClipGeometry="M0,0 V16 H16 V0 H0 Z">
                                                    <GeometryDrawing Brush="#FFF2FCF3"
                                                                     Geometry="F1 M16,16z M0,0z M13.5,7.13397C14.1667,7.51888,14.1667,8.48112,13.5,8.86602L4.5,14.0622C3.83333,14.4471,3,13.966,3,13.1962L3,2.80385C3,2.03405,3.83333,1.55292,4.5,1.93782L13.5,7.13397z">
                                                        <GeometryDrawing.Pen>
                                                            <Pen Brush="#FF208A3C" Thickness="1" StartLineCap="Flat"
                                                                 EndLineCap="Flat" LineJoin="Miter" />
                                                        </GeometryDrawing.Pen>
                                                    </GeometryDrawing>
                                                </DrawingGroup>
                                            </DrawingImage.Drawing>
                                        </DrawingImage>
                                    </Image.Source>
                                </Image>
                                <Image Name="InkReplayPauseButtonImage" Width="18" Height="18">
                                    <Image.Source>
                                        <DrawingImage>
                                            <DrawingImage.Drawing>
                                                <DrawingGroup ClipGeometry="M0,0 V16 H16 V0 H0 Z">
                                                    <GeometryDrawing Brush="#FFEBECF0">
                                                        <GeometryDrawing.Pen>
                                                            <Pen Brush="#FF6C707E" Thickness="1" StartLineCap="Flat"
                                                                 EndLineCap="Flat" LineJoin="Miter" />
                                                        </GeometryDrawing.Pen>
                                                        <GeometryDrawing.Geometry>
                                                            <RectangleGeometry RadiusX="0.5" RadiusY="0.5"
                                                                               Rect="3.5,2.5,3,11" />
                                                        </GeometryDrawing.Geometry>
                                                    </GeometryDrawing>
                                                    <GeometryDrawing Brush="#FFEBECF0">
                                                        <GeometryDrawing.Pen>
                                                            <Pen Brush="#FF6C707E" Thickness="1" StartLineCap="Flat"
                                                                 EndLineCap="Flat" LineJoin="Miter" />
                                                        </GeometryDrawing.Pen>
                                                        <GeometryDrawing.Geometry>
                                                            <RectangleGeometry RadiusX="0.5" RadiusY="0.5"
                                                                               Rect="9.5,2.5,3,11" />
                                                        </GeometryDrawing.Geometry>
                                                    </GeometryDrawing>
                                                </DrawingGroup>
                                            </DrawingImage.Drawing>
                                        </DrawingImage>
                                    </Image.Source>
                                </Image>
                            </Grid>
                        </Border>
                        <Border Name="InkReplayStopButtonBorder" MouseDown="InkReplayStopButtonBorder_OnMouseDown"
                                MouseUp="InkReplayStopButtonBorder_OnMouseUp" CornerRadius="16" Height="32" Width="32">
                            <Image Width="18" Height="18">
                                <Image.Source>
                                    <DrawingImage>
                                        <DrawingImage.Drawing>
                                            <DrawingGroup ClipGeometry="M0,0 V16 H16 V0 H0 Z">
                                                <GeometryDrawing Brush="#FFFFF7F7">
                                                    <GeometryDrawing.Pen>
                                                        <Pen Brush="#FFDB3B4B" Thickness="1" StartLineCap="Flat"
                                                             EndLineCap="Flat" LineJoin="Miter" />
                                                    </GeometryDrawing.Pen>
                                                    <GeometryDrawing.Geometry>
                                                        <RectangleGeometry RadiusX="1.5" RadiusY="1.5"
                                                                           Rect="2.5,2.5,11,11" />
                                                    </GeometryDrawing.Geometry>
                                                </GeometryDrawing>
                                            </DrawingGroup>
                                        </DrawingImage.Drawing>
                                    </DrawingImage>
                                </Image.Source>
                            </Image>
                        </Border>
                        <Border Name="InkReplayReplayButtonBorder" MouseDown="InkReplayReplayButtonBorder_OnMouseDown"
                                MouseUp="InkReplayReplayButtonBorder_OnMouseUp" CornerRadius="16" Height="32"
                                Width="32">
                            <Image Width="22" Height="22" Margin="-1,-1,0,0">
                                <Image.Source>
                                    <DrawingImage>
                                        <DrawingImage.Drawing>
                                            <DrawingGroup ClipGeometry="M0,0 V16 H16 V0 H0 Z">
                                                <GeometryDrawing Brush="#FF208A3C"
                                                                 Geometry="F0 M16,16z M0,0z M9,9.50215C9,8.32441,10.2951,7.60608,11.2942,8.22967L15.2962,10.7275C16.2372,11.3149,16.2372,12.6851,15.2962,13.2725L11.2942,15.7703C10.2951,16.3939,9,15.6756,9,14.4978L9,9.50215z M10.7647,9.07799C10.4317,8.87013,10,9.10957,10,9.50215L10,14.4978C10,14.8904,10.4317,15.1298,10.7647,14.922L14.7667,12.4241C15.0804,12.2284,15.0804,11.7716,14.7667,11.5758L10.7647,9.07799z" />
                                                <GeometryDrawing Brush="#FFF2FCF3"
                                                                 Geometry="F1 M16,16z M0,0z M10,9.50217C10,9.10959,10.4317,8.87015,10.7647,9.07801L14.7667,11.5758C15.0804,11.7716,15.0804,12.2284,14.7667,12.4242L10.7647,14.922C10.4317,15.1299,10,14.8904,10,14.4978L10,9.50217z" />
                                                <GeometryDrawing Brush="#FF6C707E"
                                                                 Geometry="F1 M16,16z M0,0z M14,1.5C14,1.22386 13.7761,1 13.5,1 13.2239,1 13,1.22386 13,1.5L13,4.68235C11.9256,3.06631 10.0877,2 8,2 4.68629,2 2,4.68629 2,8 2,11.3137 4.68629,14 8,14L8,13C5.23858,13 3,10.7614 3,8 3,5.23858 5.23858,3 8,3 9.63527,3 11.0878,3.78495 12.0005,5L9.5,5C9.22386,5 9,5.22386 9,5.5 9,5.77614 9.22386,6 9.5,6L14,6 14,1.5z" />
                                            </DrawingGroup>
                                        </DrawingImage.Drawing>
                                    </DrawingImage>
                                </Image.Source>
                            </Image>
                        </Border>
                        <Border Name="InkReplaySpeedButtonBorder" MouseDown="InkReplaySpeedButtonBorder_OnMouseDown"
                                MouseUp="InkReplaySpeedButtonBorder_OnMouseUp" CornerRadius="16" Height="32" Width="32">
                            <Image Width="22" Height="22" Margin="-1,-1,-1,0">
                                <Image.Source>
                                    <DrawingImage>
                                        <DrawingImage.Drawing>
                                            <DrawingGroup ClipGeometry="M0,0 V16 H16 V0 H0 Z">
                                                <GeometryDrawing Brush="#FF208A3C"
                                                                 Geometry="F0 M16,16z M0,0z M9,9.50215C9,8.32441,10.2951,7.60608,11.2942,8.22967L15.2962,10.7275C16.2372,11.3149,16.2372,12.6851,15.2962,13.2725L11.2942,15.7703C10.2951,16.3939,9,15.6756,9,14.4978L9,9.50215z M10.7647,9.07799C10.4317,8.87013,10,9.10957,10,9.50215L10,14.4978C10,14.8904,10.4317,15.1298,10.7647,14.922L14.7667,12.4241C15.0804,12.2284,15.0804,11.7716,14.7667,11.5758L10.7647,9.07799z" />
                                                <GeometryDrawing Brush="#FFF2FCF3"
                                                                 Geometry="F1 M16,16z M0,0z M10,9.50217C10,9.10959,10.4317,8.87015,10.7647,9.07801L14.7667,11.5758C15.0804,11.7716,15.0804,12.2284,14.7667,12.4242L10.7647,14.922C10.4317,15.1299,10,14.8904,10,14.4978L10,9.50217z" />
                                                <GeometryDrawing Brush="#FF6C707E"
                                                                 Geometry="F1 M16,16z M0,0z M1.5,9C1.5,5.41015 4.41015,2.5 8,2.5 11.5899,2.5 14.5,5.41015 14.5,9 14.5,9.01716 14.4999,9.03444 14.4997,9.05183L15.4651,9.65439C15.4879,9.42788 15.5,9.20815 15.5,9 15.5,4.85786 12.1421,1.5 8,1.5 3.85786,1.5 0.5,4.85786 0.5,9 0.5,10.1604 0.877241,11.6805 1.36637,12.7304 1.44463,12.8984 1.61594,13 1.80126,13L8,13 8,12 2.13917,12C1.76974,11.0874,1.5,9.89088,1.5,9z" />
                                                <GeometryDrawing Brush="#FF6C707E"
                                                                 Geometry="F1 M16,16z M0,0z M8,10.6L8,9.6C7.55826,9.59989 7.2002,9.24176 7.2002,8.8 7.2002,8.35817 7.55837,8 8.0002,8 8.15213,8 8.29417,8.04235 8.41515,8.11589 8.60651,7.82993 8.85445,7.58935 9.13847,7.40554 8.97934,7.27549 8.79754,7.17214 8.5999,7.10232L8.5999,3.99999C8.5999,3.66862 8.33127,3.39999 7.9999,3.39999 7.66853,3.39999 7.3999,3.66862 7.3999,3.99999L7.3999,7.10253C6.70094,7.34971 6.2002,8.01638 6.2002,8.8 6.2002,9.79405 7.00598,10.5999 8,10.6z" />
                                            </DrawingGroup>
                                        </DrawingImage.Drawing>
                                    </DrawingImage>
                                </Image.Source>
                            </Image>
                        </Border>
                        <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                            <TextBlock Name="InkReplaySpeedTextBlock" Margin="4,0,0,0" FontSize="13"
                                       Foreground="{DynamicResource FloatingBarForegroundBrush}" Text="1.0x" VerticalAlignment="Center">
                            </TextBlock>
                        </StackPanel>

                    </ikw:SimpleStackPanel>
                </ikw:SimpleStackPanel>
            </Border>
        </Grid>
        <!--侧边栏//左-->
        <localControls:SidePanelToggle x:Name="LeftSidePanel" Click="LeftUnFoldButtonDisplayQuickPanel_MouseUp"
                                       Visibility="Visible" Margin="-60,0,0,-150"
                                       HorizontalAlignment="Left" VerticalAlignment="Center" />
        <!--收纳下的快捷面板//左-->
        <Viewbox Width="50" Visibility="Collapsed"  d:Visibility="Visible" Name="LeftUnFoldButtonQuickPanel" Margin="-60,0,0,-150" d:Margin="-60,0,0,500"
                 HorizontalAlignment="Left" VerticalAlignment="Center">
            <Border x:Name="LeftQuickPanelBorder" ClipToBounds="False" Visibility="Visible" CornerRadius="6" Background="{DynamicResource FloatingBarBackgroundBrush}" Opacity="1"
                    BorderThickness="1" BorderBrush="{DynamicResource FloatingBarBorderBrush}" d:BorderBrush="Red" d:Background="Green" Width="32">
                <Border.Effect>
                    <DropShadowEffect x:Name="LeftQuickPanelShadow" BlurRadius="16" ShadowDepth="2" Direction="270" Opacity="0.3" Color="#000000" />
                </Border.Effect>
                <ikw:SimpleStackPanel Orientation="Vertical" Margin="0,5">
                    <controls:QuickPanelButton IconSource="{DynamicResource QuickPanelPersonMoneyIcon}" Label="{x:Static props:FloatingBarStrings.QuickPanel_SingleDraw}" ButtonMouseUp="SymbolIconRandOne_MouseUp" />
                    <controls:QuickPanelButton IconSource="{DynamicResource QuickPanelPeopleMoneyIcon}" Label="{x:Static props:FloatingBarStrings.Tools_RandomDraw}" ButtonMouseUp="SymbolIconRand_MouseUp" />
                    <controls:QuickPanelButton IconSource="{DynamicResource QuickPanelTimerIcon}" Label="{x:Static props:FloatingBarStrings.QuickPanel_Timer}" ButtonMouseUp="ImageCountdownTimer_MouseUp" />
                    <controls:QuickPanelButton IconSource="{DynamicResource QuickPanelBlackboardIcon}" Label="{x:Static props:FloatingBarStrings.FloatingBar_Whiteboard}" ButtonMouseUp="ImageBlackboard_MouseUp" />
                    <controls:QuickPanelButton x:Name="BtnExitPPTFromSidebarLeft" IconSource="{DynamicResource QuickPanelEndSlideshowIcon}" Label="{x:Static props:FloatingBarStrings.QuickPanel_ExitShow}" LabelFontSize="7" Visibility="Collapsed"  d:Visibility="Visible" ButtonMouseUp="ExitPPTSlideShow_MouseUp" />
                    <controls:QuickPanelButton IconSource="{DynamicResource QuickPanelEyeIcon}" Label="{x:Static props:FloatingBarStrings.QuickPanel_Show}" ButtonMouseUp="UnFoldFloatingBar_MouseUp" />
                    <controls:QuickPanelButton IconSource="{DynamicResource QuickPanelChevronLeftIcon}" ButtonMouseUp="HideQuickPanel_MouseUp" />
                </ikw:SimpleStackPanel>
            </Border>
        </Viewbox>
        <!--侧边栏//右-->
        <localControls:SidePanelToggle x:Name="RightSidePanel" Click="RightUnFoldButtonDisplayQuickPanel_MouseUp"
                                       Visibility="{Binding ElementName=LeftSidePanel, Path=Visibility}"
                                       Margin="0,0,-60,-150" IsRightSide="True"
                                       HorizontalAlignment="Right" VerticalAlignment="Center" />
        <!--收纳下的快捷面板//右-->
        <Viewbox Width="50" Visibility="Collapsed"  d:Visibility="Visible" Name="RightUnFoldButtonQuickPanel" Margin="0,0,-60,-150" d:Margin="0,0,-60,500"
                 HorizontalAlignment="Right" VerticalAlignment="Center">
            <Border x:Name="RightQuickPanelBorder" ClipToBounds="False" Visibility="Visible" CornerRadius="6" Background="{DynamicResource FloatingBarBackgroundBrush}" Opacity="1"
                    BorderThickness="1" BorderBrush="{DynamicResource FloatingBarBorderBrush}" d:BorderBrush="Red" d:Background="Green" Width="32">
                <Border.Effect>
                    <DropShadowEffect x:Name="RightQuickPanelShadow" BlurRadius="16" ShadowDepth="2" Direction="270" Opacity="0.3" Color="#000000" />
                </Border.Effect>
                <ikw:SimpleStackPanel Orientation="Vertical" Margin="0,5">
                    <controls:QuickPanelButton IconSource="{DynamicResource QuickPanelPersonMoneyIcon}" Label="{x:Static props:FloatingBarStrings.QuickPanel_SingleDraw}" ButtonMouseUp="SymbolIconRandOne_MouseUp" />
                    <controls:QuickPanelButton IconSource="{DynamicResource QuickPanelPeopleMoneyIcon}" Label="{x:Static props:FloatingBarStrings.Tools_RandomDraw}" ButtonMouseUp="SymbolIconRand_MouseUp" />
                    <controls:QuickPanelButton IconSource="{DynamicResource QuickPanelTimerIcon}" Label="{x:Static props:FloatingBarStrings.QuickPanel_Timer}" ButtonMouseUp="ImageCountdownTimer_MouseUp" />
                    <controls:QuickPanelButton IconSource="{DynamicResource QuickPanelBlackboardIcon}" Label="{x:Static props:FloatingBarStrings.FloatingBar_Whiteboard}" ButtonMouseUp="ImageBlackboard_MouseUp" />
                    <controls:QuickPanelButton x:Name="BtnExitPPTFromSidebarRight" IconSource="{DynamicResource QuickPanelEndSlideshowIcon}" Label="{x:Static props:FloatingBarStrings.QuickPanel_ExitShow}" LabelFontSize="7" Visibility="Collapsed"  d:Visibility="Visible" ButtonMouseUp="ExitPPTSlideShow_MouseUp" />
                    <controls:QuickPanelButton IconSource="{DynamicResource QuickPanelEyeIcon}" Label="{x:Static props:FloatingBarStrings.QuickPanel_Show}" ButtonMouseUp="UnFoldFloatingBar_MouseUp" />
                    <controls:QuickPanelButton IconSource="{DynamicResource QuickPanelChevronLeftIcon}" ButtonMouseUp="HideQuickPanel_MouseUp" RenderTransformOrigin="0.5,0.5">
                        <controls:QuickPanelButton.RenderTransform>
                            <RotateTransform Angle="180" />
                        </controls:QuickPanelButton.RenderTransform>
                    </controls:QuickPanelButton>
                </ikw:SimpleStackPanel>
            </Border>
        </Viewbox>
        <!-- 视频展台侧栏（VideoPresenterSidebar）已移除：设备选择/按钮迁移到 BoothPopupContent 弹窗菜单，
             照片预览迁移到白板右下角页码列表（RefreshBoothPageListView）。 -->
        <!-- 包装层：PPT 时间胶囊容器，承载 ScaleTransform 与屏幕四角定位，非死代码 -->
        <Border x:Name="PPTTimeCapsuleContainer"
                Visibility="Collapsed"  d:Visibility="Visible"
                Panel.ZIndex="999"
                HorizontalAlignment="Right"
                VerticalAlignment="Top"
                Margin="0,20,20,0"
                RenderTransformOrigin="1,0">
            <Border.RenderTransform>
                <ScaleTransform x:Name="PPTTimeCapsuleScaleTransform" ScaleX="1" ScaleY="1"/>
            </Border.RenderTransform>
            <Windows:PPTTimeCapsule x:Name="PPTTimeCapsule"/>
        </Border>
        <!-- 包装层：PPT 放映快捷面板，代码中 4 处控制 Visibility/位置，非死代码 -->
        <Border x:Name="PPTQuickPanelContainer"
                Visibility="Collapsed"  d:Visibility="Visible"
                Panel.ZIndex="999"
                HorizontalAlignment="Right"
                VerticalAlignment="Top"
                Margin="0,50,0,0">
            <Windows:PPTQuickPanel x:Name="PPTQuickPanel"/>
        </Border>
        <localControls:DynamicNotificationControl x:Name="DynamicNotification"
                Panel.ZIndex="1100"
                HorizontalAlignment="Center"
                VerticalAlignment="Top" />
        <!-- PPT 增强预览全屏加载动画 -->
        <Grid x:Name="PPTEnhancedPreviewLoadingOverlay"
                Panel.ZIndex="1200"
                Visibility="Collapsed"
                Background="#B0000000">
            <ikw:SimpleStackPanel HorizontalAlignment="Center" VerticalAlignment="Center"
                    Orientation="Vertical" Spacing="16">
                <!-- 自定义圆环进度指示器 -->
                <Grid Width="64" Height="64">
                    <!-- 轨道 -->
                    <Ellipse Stroke="#33FFFFFF" StrokeThickness="4"
                             HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
                    <!-- 进度弧 -->
                    <Path x:Name="PPTLoadingRing"
                            Stroke="White" StrokeThickness="4" Fill="Transparent"
                            Stretch="None"
                            RenderTransformOrigin="0.5,0.5">
                        <Path.RenderTransform>
                            <RotateTransform x:Name="PPTLoadingArcRotate"/>
                        </Path.RenderTransform>
                    </Path>
                </Grid>
                <TextBlock x:Name="PPTLoadingProgressText"
                        Foreground="White" FontSize="14"
                        HorizontalAlignment="Center"
                        Text="{x:Static props:PPTStrings.LoadingPPT}"/>
            </ikw:SimpleStackPanel>
        </Grid>
        <!-- 内联对话框根容器 -->
        <Grid x:Name="InlineDialogRoot"
                Panel.ZIndex="9999"
                Visibility="Collapsed"
                Background="{DynamicResource ContentDialogSmokeFill}">
            <Border x:Name="InlineDialogCard"
                    MinWidth="{DynamicResource ContentDialogMinWidth}"
                    MinHeight="{DynamicResource ContentDialogMinHeight}"
                    MaxWidth="{DynamicResource ContentDialogMaxWidth}"
                    MaxHeight="{DynamicResource ContentDialogMaxHeight}"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Background="{DynamicResource ContentDialogBackground}"
                    BorderBrush="{DynamicResource ContentDialogBorderBrush}"
                    BorderThickness="{DynamicResource ContentDialogBorderWidth}"
                    CornerRadius="{DynamicResource OverlayCornerRadius}"
                    RenderTransformOrigin="0.5,0.5">
                <Border.RenderTransform>
                    <ScaleTransform x:Name="InlineDialogScaleTransform" ScaleX="1.05" ScaleY="1.05" />
                </Border.RenderTransform>
                <Border CornerRadius="{DynamicResource OverlayCornerRadius}">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Border Padding="{DynamicResource ContentDialogPadding}"
                                Background="{DynamicResource ContentDialogTopOverlay}"
                                BorderBrush="{DynamicResource ContentDialogSeparatorBorderBrush}"
                                BorderThickness="{DynamicResource ContentDialogSeparatorThickness}"
                                CornerRadius="{DynamicResource OverlayCornerRadius}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="*" />
                                </Grid.RowDefinitions>
                                <ContentControl x:Name="InlineDialogTitle"
                                                Margin="{DynamicResource ContentDialogTitleMargin}"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top"
                                                FontFamily="{DynamicResource ContentControlThemeFontFamily}"
                                                FontSize="20"
                                                FontWeight="SemiBold"
                                                Foreground="{DynamicResource ContentDialogForeground}"
                                                IsTabStop="False">
                                    <ContentControl.Template>
                                        <ControlTemplate TargetType="ContentControl">
                                            <ui:ContentPresenterEx Margin="{TemplateBinding Padding}"
                                                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                              Content="{TemplateBinding Content}"
                                                              TextWrapping="Wrap" />
                                        </ControlTemplate>
                                    </ContentControl.Template>
                                </ContentControl>
                                <TextBlock x:Name="InlineDialogContent"
                                           Grid.Row="1"
                                           FontFamily="{DynamicResource ContentControlThemeFontFamily}"
                                           FontSize="{DynamicResource ControlContentThemeFontSize}"
                                           Foreground="{DynamicResource ContentDialogForeground}"
                                           TextWrapping="Wrap" />
                            </Grid>
                        </Border>
                        <Border Grid.Row="1"
                                Padding="{DynamicResource ContentDialogPadding}"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Bottom"
                                Background="{DynamicResource ContentDialogBackground}"
                                CornerRadius="0,0,8,8">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="{DynamicResource ContentDialogButtonSpacing}" />
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>
                                <Button x:Name="InlineDialogSecondaryButton"
                                        HorizontalAlignment="Stretch"
                                        Content="{x:Static props:CommonStrings.No}"
                                        IsTabStop="False"
                                        Click="InlineDialogSecondaryButton_Click"
                                        Style="{DynamicResource DefaultButtonStyle}" />
                                <Button x:Name="InlineDialogPrimaryButton"
                                        Grid.Column="2"
                                        HorizontalAlignment="Stretch"
                                        Content="{x:Static props:CommonStrings.Yes}"
                                        IsTabStop="False"
                                        Click="InlineDialogPrimaryButton_Click"
                                        Style="{DynamicResource AccentButtonStyle}" />
                            </Grid>
                        </Border>
                    </Grid>
                </Border>
            </Border>
        </Grid>
    </Grid>
</helpers:PerformanceTransparentWin>
