245 lines
14 KiB
XML
245 lines
14 KiB
XML
<UserControl x:Class="Ink_Canvas.Windows.PPTQuickPanel"
|
|
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"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="400" d:DesignWidth="300">
|
|
<UserControl.Resources>
|
|
<ResourceDictionary>
|
|
<!-- 展开动画 -->
|
|
<Storyboard x:Key="ExpandAnimation">
|
|
<DoubleAnimation Storyboard.TargetName="PanelTransform"
|
|
Storyboard.TargetProperty="X"
|
|
Duration="0:0:0.3">
|
|
<DoubleAnimation.EasingFunction>
|
|
<CubicEase EasingMode="EaseOut"/>
|
|
</DoubleAnimation.EasingFunction>
|
|
</DoubleAnimation>
|
|
</Storyboard>
|
|
|
|
<!-- 折叠动画 -->
|
|
<Storyboard x:Key="CollapseAnimation">
|
|
<DoubleAnimation Storyboard.TargetName="PanelTransform"
|
|
Storyboard.TargetProperty="X"
|
|
Duration="0:0:0.3">
|
|
<DoubleAnimation.EasingFunction>
|
|
<CubicEase EasingMode="EaseOut"/>
|
|
</DoubleAnimation.EasingFunction>
|
|
</DoubleAnimation>
|
|
</Storyboard>
|
|
</ResourceDictionary>
|
|
</UserControl.Resources>
|
|
|
|
<Grid>
|
|
<Canvas x:Name="MainCanvas" HorizontalAlignment="Right" VerticalAlignment="Top">
|
|
<!-- 主面板容器 -->
|
|
<Grid x:Name="MainPanel" Canvas.Right="0" Canvas.Top="50">
|
|
<Grid.RenderTransform>
|
|
<TranslateTransform x:Name="PanelTransform" X="0"/>
|
|
</Grid.RenderTransform>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="24"/>
|
|
<ColumnDefinition Width="200"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- 左侧圆角矩形 - 箭头按钮区域 -->
|
|
<Border x:Name="ArrowButtonBorder"
|
|
Grid.Column="0"
|
|
CornerRadius="6,0,0,6"
|
|
Cursor="Hand"
|
|
MouseLeftButtonDown="ArrowButton_MouseLeftButtonDown"
|
|
MouseEnter="ArrowButton_MouseEnter"
|
|
MouseLeave="ArrowButton_MouseLeave">
|
|
<Border.Background>
|
|
<SolidColorBrush x:Name="ArrowButtonBackgroundBrush" Color="#CCFFFFFF"/>
|
|
</Border.Background>
|
|
<Border.Effect>
|
|
<DropShadowEffect BlurRadius="6" ShadowDepth="0" Opacity="0.2" Color="Black"/>
|
|
</Border.Effect>
|
|
|
|
<Viewbox Width="12" Height="12" VerticalAlignment="Center" HorizontalAlignment="Center">
|
|
<Path x:Name="ArrowPath"
|
|
Data="M 0,0 L 12,6 L 0,12 Z"
|
|
Stretch="Uniform"
|
|
RenderTransformOrigin="0.5,0.5">
|
|
<Path.Fill>
|
|
<SolidColorBrush x:Name="ArrowPathFillBrush" Color="#FF000000"/>
|
|
</Path.Fill>
|
|
<Path.RenderTransform>
|
|
<RotateTransform x:Name="ArrowRotateTransform" Angle="180"/>
|
|
</Path.RenderTransform>
|
|
</Path>
|
|
</Viewbox>
|
|
</Border>
|
|
|
|
<!-- 右侧矩形 - 面板内容区域 -->
|
|
<Border x:Name="ContentBorder"
|
|
Grid.Column="1"
|
|
CornerRadius="0"
|
|
MouseLeftButtonDown="ContentBorder_MouseLeftButtonDown"
|
|
MouseMove="ContentBorder_MouseMove"
|
|
MouseLeftButtonUp="ContentBorder_MouseLeftButtonUp"
|
|
TouchDown="ContentBorder_TouchDown"
|
|
TouchMove="ContentBorder_TouchMove"
|
|
TouchUp="ContentBorder_TouchUp">
|
|
<Border.Background>
|
|
<SolidColorBrush x:Name="ContentBackgroundBrush" Color="#CCFFFFFF"/>
|
|
</Border.Background>
|
|
<Border.Effect>
|
|
<DropShadowEffect BlurRadius="8" ShadowDepth="0" Opacity="0.2" Color="Black"/>
|
|
</Border.Effect>
|
|
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
|
<StackPanel x:Name="ContentPanel" Margin="10,8" Orientation="Vertical">
|
|
|
|
<!-- 系统音量控制区域 -->
|
|
<Grid Margin="0,0,0,8">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- 左侧音量按钮 -->
|
|
<Button x:Name="VolumeMuteButton"
|
|
Grid.Column="0"
|
|
Width="32" Height="32"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
Cursor="Hand"
|
|
Click="VolumeMuteButton_Click"
|
|
Margin="0,0,8,0"
|
|
Padding="0"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Center">
|
|
<Viewbox Width="20" Height="20" Stretch="Uniform">
|
|
<Grid>
|
|
<Path x:Name="VolumeIconPath"
|
|
Data="M 3,9 v 6 h 4 l 5,5 v -16 l -5,5 h -4 z"
|
|
Stretch="Uniform">
|
|
<Path.Fill>
|
|
<SolidColorBrush x:Name="VolumeIconFillBrush" Color="#FF000000"/>
|
|
</Path.Fill>
|
|
</Path>
|
|
<Path x:Name="VolumeIconPath2"
|
|
Data=""
|
|
Stretch="Uniform"
|
|
Opacity="0.5"
|
|
Visibility="Collapsed">
|
|
<Path.Fill>
|
|
<SolidColorBrush x:Name="VolumeIconFillBrush2" Color="#FF000000"/>
|
|
</Path.Fill>
|
|
</Path>
|
|
</Grid>
|
|
</Viewbox>
|
|
</Button>
|
|
|
|
<!-- 中间音量滑块 -->
|
|
<Grid Grid.Column="1" VerticalAlignment="Center" Margin="0,0,8,0">
|
|
<Slider x:Name="VolumeSlider"
|
|
Minimum="0"
|
|
Maximum="100"
|
|
Value="50"
|
|
TickFrequency="1"
|
|
IsSnapToTickEnabled="True"
|
|
ValueChanged="VolumeSlider_ValueChanged"
|
|
PreviewMouseLeftButtonUp="VolumeSlider_PreviewMouseLeftButtonUp"
|
|
ManipulationCompleted="VolumeSlider_ManipulationCompleted"/>
|
|
</Grid>
|
|
|
|
<!-- 右侧音量值 -->
|
|
<TextBlock x:Name="VolumeValueText"
|
|
Grid.Column="2"
|
|
Text="50%"
|
|
FontSize="10"
|
|
VerticalAlignment="Center"
|
|
MinWidth="32"
|
|
TextAlignment="Center">
|
|
<TextBlock.Foreground>
|
|
<SolidColorBrush x:Name="VolumeValueForegroundBrush" Color="#80000000"/>
|
|
</TextBlock.Foreground>
|
|
</TextBlock>
|
|
</Grid>
|
|
|
|
<!-- 分隔线 -->
|
|
<Separator x:Name="Separator1" Margin="0,0,0,8" Height="1">
|
|
<Separator.Background>
|
|
<SolidColorBrush x:Name="Separator1BackgroundBrush" Color="#E0E0E0"/>
|
|
</Separator.Background>
|
|
</Separator>
|
|
|
|
<!-- 图片插入按钮区域 -->
|
|
<StackPanel Orientation="Vertical" Margin="0,0,0,8">
|
|
<!-- 选择文件按钮 -->
|
|
<Button x:Name="InsertImageSelectFileButton"
|
|
Content="选择文件"
|
|
FontSize="11"
|
|
Height="30"
|
|
Background="#3b82f6"
|
|
Foreground="White"
|
|
BorderThickness="0"
|
|
Cursor="Hand"
|
|
Click="InsertImageSelectFileButton_Click"
|
|
Margin="0,0,0,4">
|
|
<Button.Template>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border Background="{TemplateBinding Background}"
|
|
CornerRadius="4"
|
|
Padding="{TemplateBinding Padding}">
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Button.Template>
|
|
</Button>
|
|
|
|
<!-- 截图插入按钮 -->
|
|
<Button x:Name="InsertImageScreenshotButton"
|
|
Content="截图插入"
|
|
FontSize="11"
|
|
Height="30"
|
|
Background="#3b82f6"
|
|
Foreground="White"
|
|
BorderThickness="0"
|
|
Cursor="Hand"
|
|
Click="InsertImageScreenshotButton_Click"
|
|
Margin="0,0,0,0">
|
|
<Button.Template>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border Background="{TemplateBinding Background}"
|
|
CornerRadius="4"
|
|
Padding="{TemplateBinding Padding}">
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Button.Template>
|
|
</Button>
|
|
</StackPanel>
|
|
|
|
<!-- 聚焦放大镜(暂未设计)- 暂时隐藏 -->
|
|
<Border x:Name="MagnifierSection" Margin="0,0,0,8" Visibility="Collapsed">
|
|
<StackPanel Orientation="Vertical">
|
|
<TextBlock x:Name="MagnifierTitleText" Text="聚焦放大镜" FontSize="11" FontWeight="Bold" Margin="0,0,0,6">
|
|
<TextBlock.Foreground>
|
|
<SolidColorBrush x:Name="MagnifierTitleForegroundBrush" Color="#FF000000"/>
|
|
</TextBlock.Foreground>
|
|
</TextBlock>
|
|
<TextBlock x:Name="MagnifierDescText" Text="功能暂未设计" FontSize="9" FontStyle="Italic">
|
|
<TextBlock.Foreground>
|
|
<SolidColorBrush x:Name="MagnifierDescForegroundBrush" Color="#80000000"/>
|
|
</TextBlock.Foreground>
|
|
</TextBlock>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</Border>
|
|
</Grid>
|
|
</Canvas>
|
|
</Grid>
|
|
</UserControl>
|
|
|
|
|