464 lines
40 KiB
XML
464 lines
40 KiB
XML
<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" Topmost="True" KeyDown="Window_KeyDown"
|
||
xmlns:local="clr-namespace:Ink_Canvas" xmlns:ui="http://schemas.modernwpf.com/2019"
|
||
AllowsTransparency="True" WindowStyle="None" ResizeMode="NoResize"
|
||
mc:Ignorable="d" WindowState="Maximized" Loaded="Window_Loaded" Background="Transparent" ShowInTaskbar="False"
|
||
Title="MainWindow" Height="1000" Width="800" FontFamily="Microsoft YaHei UI"
|
||
Foreground="Black" Closed="Window_Closed"
|
||
Stylus.IsPressAndHoldEnabled="False">
|
||
<!--资源中添加命令-->
|
||
<Window.Resources>
|
||
<RoutedUICommand x:Key="KeyExit" Text=" "/>
|
||
<RoutedUICommand x:Key="back_HotKey_Command" Text=" "/>
|
||
</Window.Resources>
|
||
<!--输入命令绑定-->
|
||
<Window.InputBindings>
|
||
<KeyBinding Gesture="Shift+Esc" Command="{StaticResource KeyExit}"/>
|
||
<KeyBinding Modifiers="Ctrl" Key="Z" Command="{StaticResource back_HotKey_Command}"/>
|
||
</Window.InputBindings>
|
||
<!--命令执行方法绑定-->
|
||
<Window.CommandBindings>
|
||
<CommandBinding Command="{StaticResource back_HotKey_Command}"
|
||
CanExecute="CommandBinding_CanExecute"
|
||
Executed="back_HotKey"/>
|
||
<CommandBinding Command="{StaticResource KeyExit}"
|
||
CanExecute="CommandBinding_CanExecute"
|
||
Executed="KeyExit"/>
|
||
</Window.CommandBindings>
|
||
<Grid x:Name="Main_Grid" Background="#01FFFFFF" PreviewKeyDown="Main_Grid_PreviewKeyDown">
|
||
<Grid Name="GridBackgroundCoverHolder">
|
||
<Grid Name="GridBackgroundCover" Visibility="Hidden" Background="#FFF2F2F2"/>
|
||
</Grid>
|
||
<Label Name="Label" Visibility="Collapsed" Content="0"/>
|
||
<InkCanvas x:Name="inkCanvas" Background="Transparent" Cursor="Pen" ForceCursor="False"
|
||
TouchUp="Main_Grid_TouchUp" 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"
|
||
PreviewTouchUp="inkCanvas_PreviewTouchUp"
|
||
MouseDown="inkCanvas_MouseDown" MouseMove="inkCanvas_MouseMove" MouseUp="inkCanvas_MouseUp"
|
||
ManipulationStarting="inkCanvas_ManipulationStarting"
|
||
SelectionChanged="inkCanvas_SelectionChanged"
|
||
StrokeCollected="inkCanvas_StrokeCollected">
|
||
<!--<InkCanvas.DefaultDrawingAttributes>
|
||
<DrawingAttributes StylusTip="Ellipse" Height="8" Width="4" IgnorePressure="False" FitToCurve="True" >
|
||
<DrawingAttributes.StylusTipTransform>
|
||
<Matrix M11="1" M12="1.5" M21="2.2" M22="1"/>
|
||
</DrawingAttributes.StylusTipTransform>
|
||
</DrawingAttributes>
|
||
</InkCanvas.DefaultDrawingAttributes>-->
|
||
</InkCanvas>
|
||
<Grid Name="GridInkCanvasSelectionCover" MouseUp="GridInkCanvasSelectionCover_MouseUp" IsManipulationEnabled="True"
|
||
ManipulationStarting="GridInkCanvasSelectionCover_ManipulationStarting"
|
||
ManipulationCompleted="GridInkCanvasSelectionCover_ManipulationCompleted"
|
||
ManipulationDelta="GridInkCanvasSelectionCover_ManipulationDelta"
|
||
PreviewTouchDown="GridInkCanvasSelectionCover_PreviewTouchDown"
|
||
PreviewTouchUp="GridInkCanvasSelectionCover_PreviewTouchUp"
|
||
TouchDown="GridInkCanvasSelectionCover_TouchDown"
|
||
TouchUp="GridInkCanvasSelectionCover_TouchUp"
|
||
Background="#01FFFFFF" Opacity="0.01" Visibility="Collapsed"/>
|
||
|
||
<Grid Visibility="{Binding ElementName=GridBackgroundCoverHolder, Path=Visibility}">
|
||
<ui:SimpleStackPanel Spacing="10" Orientation="Horizontal"
|
||
VerticalAlignment="Bottom"
|
||
HorizontalAlignment="Center"
|
||
Height="50" Margin="10"
|
||
Visibility="{Binding ElementName=GridBackgroundCover, Path=Visibility}">
|
||
<Button Name="BtnWhiteBoardAdd" FontFamily="Microsoft YaHei UI"
|
||
Width="50" Height="48" FontSize="26" Click="BtnWhiteBoardAdd_Click"
|
||
Foreground="{Binding ElementName=BtnExit, Path=Foreground}"
|
||
Background="{Binding ElementName=BtnExit, Path=Background}">
|
||
<ui:SymbolIcon Symbol="Add" />
|
||
</Button>
|
||
<Button Name="BtnWhiteBoardSwitchPrevious" Content="<" FontFamily="Symbol"
|
||
Width="50" Height="48" FontSize="25" Click="BtnWhiteBoardSwitchPrevious_Click"
|
||
Foreground="{Binding ElementName=BtnExit, Path=Foreground}"
|
||
Background="{Binding ElementName=BtnExit, Path=Background}"
|
||
VerticalContentAlignment="Top"
|
||
IsEnabled="False"/>
|
||
<Border Height="48" CornerRadius="2" Margin="3,0">
|
||
<TextBlock Name="TextBlockWhiteBoardIndexInfo"
|
||
Text="1 / 1"
|
||
Foreground="{Binding ElementName=BtnExit, Path=Foreground}"
|
||
VerticalAlignment="Center" HorizontalAlignment="Center" FontFamily="Microsoft YaHei UI" FontSize="18"/>
|
||
</Border>
|
||
<Button Name="BtnWhiteBoardSwitchNext" Content=">" FontFamily="Symbol"
|
||
Width="50" Height="48" FontSize="25" Click="BtnWhiteBoardSwitchNext_Click"
|
||
Foreground="{Binding ElementName=BtnExit, Path=Foreground}"
|
||
Background="{Binding ElementName=BtnExit, Path=Background}"
|
||
VerticalContentAlignment="Top"
|
||
IsEnabled="False"/>
|
||
<Button Name="BtnWhiteBoardDelete" Click="BtnWhiteBoardDelete_Click"
|
||
FontFamily="Microsoft YaHei UI" Width="50" Height="48" FontSize="26"
|
||
Foreground="{Binding ElementName=BtnExit, Path=Foreground}"
|
||
Background="{Binding ElementName=BtnExit, Path=Background}"
|
||
IsEnabled="False">
|
||
<ui:SymbolIcon Symbol="Delete" />
|
||
</Button>
|
||
</ui:SimpleStackPanel>
|
||
</Grid>
|
||
|
||
<Border Name="BorderSettings" Background="White" BorderBrush="Black"
|
||
BorderThickness="1" CornerRadius="10"
|
||
Width="400" HorizontalAlignment="Center"
|
||
Margin="100" Visibility="Visible">
|
||
<Grid>
|
||
<ScrollViewer Margin="0,60,0,50" VerticalScrollBarVisibility="Auto"
|
||
PanningMode="VerticalOnly" ui:ThemeManager.RequestedTheme="Light"
|
||
ManipulationBoundaryFeedback="SCManipulationBoundaryFeedback">
|
||
<StackPanel Margin="20,20,20,20">
|
||
<TextBlock FontSize="14" Margin="0,0,0,0"
|
||
Text="*设置将自动保存,再次点击“设置”按钮即可关闭此页面。"/>
|
||
<TextBlock FontSize="14" Margin="0,0,0,12"
|
||
Text="*部分设置可能需要重新打开后生效。"/>
|
||
<GroupBox Header="行为">
|
||
<ui:SimpleStackPanel Spacing="12">
|
||
<ui:SimpleStackPanel Spacing="12" Orientation="Horizontal">
|
||
<Button Content="立即重新启动画板" Width="160" FontFamily="Microsoft YaHei UI" Click="BtnRestart_Click" Margin="0,0,0,10"/>
|
||
<Button Content="立即退出" Width="160" FontFamily="Microsoft YaHei UI" Click="BtnExit_Click" Margin="0,0,0,10"/>
|
||
</ui:SimpleStackPanel>
|
||
<ui:ToggleSwitch Name="ToggleSwitchRunAtStartup" Header="开机时运行" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchRunAtStartup_Toggled"/>
|
||
<TextBlock Text="我们并不推荐使用 WPS Office,因为其对于触摸设备的较差支持。" Foreground="#666666"/>
|
||
<ui:ToggleSwitch Name="ToggleSwitchSupportPowerPoint" Header="Microsoft PowerPoint 支持" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchSupportPowerPoint_Toggled"/>
|
||
<TextBlock Text="对 WPS Office 支持时会导致 WPS Office 关闭时卡顿,故禁用。" Foreground="#666666"/>
|
||
<ui:ToggleSwitch Name="ToggleSwitchSupportWPS" Header="WPS Office 支持" IsOn="False" IsEnabled="False" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchSupportPowerPoint_Toggled"/>
|
||
<ui:ToggleSwitch Name="ToggleSwitchShowCanvasAtNewSlideShow" Header="开始放映时自动显示画板" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowCanvasAtNewSlideShow_Toggled"/>
|
||
</ui:SimpleStackPanel>
|
||
</GroupBox>
|
||
<GroupBox Header="画板">
|
||
<ui:SimpleStackPanel Spacing="12">
|
||
<StackPanel Orientation="Horizontal">
|
||
<Slider x:Name="InkWidthSlider"
|
||
HorizontalAlignment="Left"
|
||
Minimum="1" Maximum="20"
|
||
Width="330" FontFamily="Microsoft YaHei UI"
|
||
ui:ControlHelper.Header="画笔粗细"
|
||
IsSnapToTickEnabled="True" Value="5"
|
||
TickFrequency="1" TickPlacement="Both"
|
||
ValueChanged="InkWidthSlider_ValueChanged"/>
|
||
<TextBlock Text="{Binding Value, ElementName=InkWidthSlider, Mode=OneWay}"
|
||
VerticalAlignment="Bottom" Margin="10,0,0,8"
|
||
FontSize="14"/>
|
||
</StackPanel>
|
||
<ui:ToggleSwitch Name="ToggleSwitchShowCursor" Header="显示画笔光标" IsOn="False" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowCursor_Toggled"/>
|
||
<ui:ToggleSwitch Name="ToggleSwitchSimulatePressure" Header="模拟压感(笔锋)(Beta)" IsOn="False" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchSimulatePressure_Toggled"/>
|
||
</ui:SimpleStackPanel>
|
||
</GroupBox>
|
||
<GroupBox Header="手势">
|
||
<ui:SimpleStackPanel Spacing="12">
|
||
<ui:ToggleSwitch Name="ToggleSwitchEnableTwoFingerRotation" Header="允许双指旋转" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchEnableTwoFingerRotation_Toggled"/>
|
||
<ui:ToggleSwitch Name="ToggleSwitchEnableTwoFingerGestureInPresentationMode" Header="允许幻灯片模式下的双指手势" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchEnableTwoFingerGestureInPresentationMode_Toggled"/>
|
||
</ui:SimpleStackPanel>
|
||
</GroupBox>
|
||
<GroupBox Header="启动">
|
||
<ui:SimpleStackPanel Spacing="12">
|
||
<ui:ToggleSwitch Name="ToggleSwitchAutoHideCanvas" Header="自动隐藏画板" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchAutoHideCanvas_Toggled"/>
|
||
<ui:ToggleSwitch Name="ToggleSwitchAutoEnterModeFinger" Header="自动进入手指模式" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchAutoEnterModeFinger_Toggled"/>
|
||
</ui:SimpleStackPanel>
|
||
</GroupBox>
|
||
<GroupBox Header="外观">
|
||
<ui:SimpleStackPanel Spacing="12">
|
||
<ui:ToggleSwitch Name="ToggleSwitchTransparentButtonBackground" Header="按钮背景半透明" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchTransparentButtonBackground_Toggled"/>
|
||
<ui:ToggleSwitch Name="ToggleSwitchShowButtonExit" Header="显示“退出”按钮" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowButtonExit_Toggled"/>
|
||
<Button Content="立即退出" Width="120" FontFamily="Microsoft YaHei UI" Click="BtnExit_Click" Margin="0,0,0,10"/>
|
||
<ui:ToggleSwitch Name="ToggleSwitchShowButtonEraser" Header="显示“橡皮”按钮" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowButtonEraser_Toggled"/>
|
||
<ui:ToggleSwitch Name="ToggleSwitchShowButtonHideControl" Header="显示“⇅ (显示或隐藏控制按钮)”按钮" IsOn="False" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowButtonHideControl_Toggled"/>
|
||
<ui:ToggleSwitch Name="ToggleSwitchShowButtonLRSwitch" Header="显示“⇆ (左右切换)”按钮" IsOn="False" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowButtonLRSwitch_Toggled"/>
|
||
<ui:ToggleSwitch Name="ToggleSwitchShowButtonModeFinger" Header="显示“手指模式”切换按钮" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowButtonModeFinger_Toggled"/>
|
||
</ui:SimpleStackPanel>
|
||
</GroupBox>
|
||
<GroupBox Header="重置">
|
||
<ui:SimpleStackPanel Spacing="12">
|
||
<StackPanel>
|
||
<TextBlock FontSize="14" Margin="0,0,0,12"
|
||
Text="重置设置为推荐设置"/>
|
||
<ui:SimpleStackPanel Orientation="Horizontal" Spacing="12">
|
||
<Button Content="重置" Width="100" FontFamily="Microsoft YaHei UI" Click="BtnResetToSuggestion_Click" Margin="0,0,0,0"/>
|
||
<ui:SymbolIcon Name="SymbolIconResetSuggestionComplete" Symbol="Accept" Visibility="Collapsed"/>
|
||
</ui:SimpleStackPanel>
|
||
</StackPanel>
|
||
<StackPanel>
|
||
<TextBlock FontSize="14" Margin="0,0,0,12"
|
||
Text="重置设置为默认设置"/>
|
||
<ui:SimpleStackPanel Orientation="Horizontal" Spacing="12">
|
||
<Button Content="重置" Width="100" FontFamily="Microsoft YaHei UI" Click="BtnResetToDefault_Click" Margin="0,0,0,10"/>
|
||
<ui:SymbolIcon Name="SymbolIconResetDefaultComplete" Symbol="Accept" Visibility="Collapsed"/>
|
||
</ui:SimpleStackPanel>
|
||
</StackPanel>
|
||
</ui:SimpleStackPanel>
|
||
</GroupBox>
|
||
<GroupBox Header="关于">
|
||
<ui:SimpleStackPanel Spacing="12">
|
||
<ui:SimpleStackPanel Orientation="Horizontal" Spacing="4">
|
||
<TextBlock FontSize="14">
|
||
<Bold>当前版本:</Bold>
|
||
</TextBlock>
|
||
<TextBlock FontSize="14" Text="" Name="TextBlockVersion"/>
|
||
</ui:SimpleStackPanel>
|
||
<TextBlock FontSize="14">
|
||
<Bold>开发者:</Bold> XY Wang (WXRIW)
|
||
</TextBlock>
|
||
<TextBlock FontSize="14">
|
||
<Bold>开源地址:</Bold>
|
||
<Hyperlink Click="HyperlinkSource_Click">
|
||
<TextBlock Text="https://github.com/WXRIW/Ink-Canvas"></TextBlock>
|
||
</Hyperlink>
|
||
</TextBlock>
|
||
<TextBlock FontSize="14">
|
||
<Bold>开源协议:</Bold> GNU General Public License v3.0
|
||
</TextBlock>
|
||
</ui:SimpleStackPanel>
|
||
</GroupBox>
|
||
<GroupBox Name="GroupBoxMASEZVersion"
|
||
Visibility="Collapsed"
|
||
Header="马鞍山二中专版说明">
|
||
<ui:SimpleStackPanel Spacing="12">
|
||
<TextBlock Name="TextBlockMASEZNotice" FontSize="14" Margin="0,0,0,0"/>
|
||
<Viewbox Margin="0,0,0,0" Height="70" HorizontalAlignment="Left">
|
||
<StackPanel Orientation="Horizontal">
|
||
<Image Source="logo.png" Width="120"/>
|
||
<Image Source="text.png" Width="200"/>
|
||
</StackPanel>
|
||
</Viewbox>
|
||
</ui:SimpleStackPanel>
|
||
</GroupBox>
|
||
</StackPanel>
|
||
</ScrollViewer>
|
||
<Grid Background="White" Margin="10,0,10,0" Height="60" VerticalAlignment="Top">
|
||
<Grid Margin="10,20,10,-10">
|
||
<TextBlock Text="设置" FontSize="26" Margin="0,0,0,12"/>
|
||
<!--<Viewbox Margin="0,-55,0,0" Height="60" HorizontalAlignment="Right">
|
||
<StackPanel Orientation="Horizontal">
|
||
<Image Source="logo.png" Width="120"/>
|
||
<Image Source="text.png" Width="200"/>
|
||
</StackPanel>
|
||
</Viewbox>-->
|
||
<Viewbox Visibility="{Binding ElementName=GroupBoxMASEZVersion, Path=Visibility}"
|
||
Margin="0,-15,0,0" Height="45" HorizontalAlignment="Right">
|
||
<StackPanel Orientation="Horizontal">
|
||
<Image Source="textCN.png" Width="200"/>
|
||
<TextBlock Text="专版" FontSize="32" Foreground="#C30F2C" VerticalAlignment="Center"/>
|
||
</StackPanel>
|
||
</Viewbox>
|
||
</Grid>
|
||
</Grid>
|
||
<Grid VerticalAlignment="Bottom" Height="50">
|
||
<Button FontFamily="Microsoft YaHei UI"
|
||
Width="120" Margin="10"
|
||
HorizontalAlignment="Right"
|
||
Content="关闭"
|
||
Click="BtnSettings_Click"
|
||
Foreground="Black"
|
||
Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
</Grid>
|
||
</Grid>
|
||
</Border>
|
||
|
||
<Viewbox Name="ViewBoxStackPanelMain" Margin="10,10,10,55" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="46">
|
||
<StackPanel Name="StackPanelMain" Width="46">
|
||
<StackPanel Name="StackPanelControl">
|
||
<Button Name="BtnExit" Content="退出" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnExit_Click" Background="#7F909090"/>
|
||
<Button Name="BtnSettings" Content="设置" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnSettings_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
<TextBlock Text="自动
粗细" Visibility="Collapsed" Margin="0,10,0,0"
|
||
FontSize="14" HorizontalAlignment="Center"
|
||
Foreground="{Binding ElementName=BtnExit, Path=Foreground}"/>
|
||
<!--<Viewbox Height="30" Visibility="Collapsed">
|
||
<ui:ToggleSwitch Name="ToggleSwitchAutoWeight" Header="" Width="40.5"
|
||
FontFamily="Microsoft YaHei UI" FontSize="19"
|
||
OnContent="" OffContent="" Toggled="ToggleSwitchAutoWeight_Toggled"/>
|
||
</Viewbox>-->
|
||
<StackPanel Name="StackPanelModeFinger" Background="#01000000">
|
||
<TextBlock Text="手指
模式" Margin="0,10,0,0"
|
||
FontSize="14" HorizontalAlignment="Center"
|
||
Foreground="{Binding ElementName=BtnExit, Path=Foreground}"/>
|
||
<Viewbox Height="30">
|
||
<ui:ToggleSwitch Name="ToggleSwitchModeFinger" Header="" Width="40.5"
|
||
FontFamily="Microsoft YaHei UI" FontSize="19"
|
||
OnContent="" OffContent="" Toggled="ToggleSwitchModeFinger_Toggled"/>
|
||
</Viewbox>
|
||
</StackPanel>
|
||
<Button Name="BtnThickness" Content="粗细" Visibility="Collapsed" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnThickness_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
<Button Name="BtnSwitchTheme" Content="深色" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnSwitchTheme_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
<Button Name="BtnSwitch" Content="背景" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnSwitch_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
<StackPanel Name="StackPanelColors" Margin="7,0,7,0">
|
||
<Button Name="BtnColorBlack" Content="" FontFamily="Microsoft YaHei UI" Background="Black"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelColors, Path=ActualWidth}"
|
||
Click="BtnColorBlack_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}"/>
|
||
<Button Name="BtnColorRed" Content="" FontFamily="Microsoft YaHei UI" Background="Red"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelColors, Path=ActualWidth}"
|
||
Click="BtnColorRed_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}"/>
|
||
<Button Name="BtnColorGreen" Content="" FontFamily="Microsoft YaHei UI" Background="#169141"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelColors, Path=ActualWidth}"
|
||
Click="BtnColorGreen_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}"/>
|
||
<Button Name="BtnColorBlue" Content="" FontFamily="Microsoft YaHei UI" Background="#239AD6"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelColors, Path=ActualWidth}"
|
||
Click="BtnColorBlue_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}"/>
|
||
<Button Name="BtnColorYellow" Content="" FontFamily="Microsoft YaHei UI" Background="#F38B00"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelColors, Path=ActualWidth}"
|
||
Click="BtnColorYellow_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}"/>
|
||
</StackPanel>
|
||
<Button Name="BtnClear" Content="清屏" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnClear_Click" MouseDoubleClick="BtnClear_MouseDoubleClick" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
<Button x:Name="BtnHideInkCanvas" Content="隐藏
画板" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnHideInkCanvas_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
<Button x:Name="BtnCheckPPT" Visibility="Collapsed" Content="检查" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnCheckPPT_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
<StackPanel Name="StackPanelPPTButtons">
|
||
<Button x:Name="BtnPPTSlideShow" Visibility="Collapsed" Content="从头
放映" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnPPTSlideShow_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
<Button x:Name="BtnPPTSlideShowEnd" Visibility="Collapsed" Content="结束
放映" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnPPTSlideShowEnd_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
<StackPanel Name="StackPanelPPTControls" Visibility="Collapsed">
|
||
<Button x:Name="BtnPPTSlidesUp" Content="↑" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnPPTSlidesUp_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
<Button x:Name="BtnPPTSlidesDown" Content="↓" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnPPTSlidesDown_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
</StackPanel>
|
||
</StackPanel>
|
||
<Button x:Name="BtnSwitchSide" Content="⇆" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnSwitchSide_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
</StackPanel>
|
||
<Button x:Name="BtnHideControl" Content="⇅" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnHideControl_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
<StackPanel>
|
||
<TextBlock Visibility="{Binding ElementName=GroupBoxMASEZVersion, Path=Visibility}" Text="二中专版" FontSize="11" FontWeight="Bold" HorizontalAlignment="Center" Margin="0,10,0,0" Foreground="{Binding ElementName=BtnExit, Path=Foreground}"/>
|
||
<Image Visibility="{Binding ElementName=GroupBoxMASEZVersion, Path=Visibility}" Source="logo2.png" Margin="0,-5,0,-15"/>
|
||
<StackPanel x:Name="StackPanelInfo">
|
||
<TextBlock Text="Developer" FontSize="8.5" FontWeight="Bold" HorizontalAlignment="Center" Margin="0,10,0,0" Foreground="{Binding ElementName=BtnExit, Path=Foreground}"/>
|
||
<TextBlock Text="XY Wang" FontSize="9" HorizontalAlignment="Center" Margin="0,3,0,0" Foreground="{Binding ElementName=BtnExit, Path=Foreground}"/>
|
||
</StackPanel>
|
||
</StackPanel>
|
||
</StackPanel>
|
||
</Viewbox>
|
||
<Viewbox Name="ViewBoxStackPanelShapes" Margin="{Binding ElementName=ViewBoxStackPanelMain, Path=Margin}" Width="46" HorizontalAlignment="Left" VerticalAlignment="Bottom" Visibility="{Binding ElementName=inkCanvas, Path=Visibility}">
|
||
<StackPanel Name="StackPanelShapes" Width="46">
|
||
<Slider HorizontalAlignment="Center" Visibility="Collapsed"
|
||
Minimum="1" Maximum="20" Orientation="Vertical"
|
||
Height="330" FontFamily="Microsoft YaHei UI"
|
||
ui:ControlHelper.Header="画笔
粗细"
|
||
IsSnapToTickEnabled="True"
|
||
TickFrequency="1" TickPlacement="Both"
|
||
RenderTransformOrigin="0.5,0.5"
|
||
Value="{Binding ElementName=InkWidthSlider, Path=Value, Mode=TwoWay}">
|
||
</Slider>
|
||
<TextBlock Text="画笔
粗细" Foreground="{Binding ElementName=BtnExit, Path=Foreground}"
|
||
FontSize="14" Margin="0,10,0,0" HorizontalAlignment="Center"/>
|
||
<Button Name="BtnPenWidthIncrease" Visibility="Visible" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,5" Height="{Binding ElementName=BtnPen, Path=ActualHeight}" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnPenWidthIncrease_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}"
|
||
Background="{Binding ElementName=BtnExit, Path=Background}">
|
||
<!--<ui:SymbolIcon Symbol="Add"/>-->
|
||
<Grid Margin="0,2,-5,0">
|
||
<TextBlock Text="<" FontFamily="Symbol" FontSize="22" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||
<TextBlock.LayoutTransform>
|
||
<RotateTransform Angle="90"/>
|
||
</TextBlock.LayoutTransform>
|
||
</TextBlock>
|
||
</Grid>
|
||
</Button>
|
||
<TextBlock Visibility="Visible" Text="{Binding Value, ElementName=InkWidthSlider, Mode=OneWay}"
|
||
FontSize="14" HorizontalAlignment="Center" Foreground="{Binding ElementName=BtnExit, Path=Foreground}"/>
|
||
<Button Name="BtnPenWidthDecrease" Visibility="Visible" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,5,0,0" Height="{Binding ElementName=BtnPen, Path=ActualHeight}" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnPenWidthDecrease_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}"
|
||
Background="{Binding ElementName=BtnExit, Path=Background}">
|
||
<!--<ui:SymbolIcon Symbol="Remove"/>-->
|
||
<Grid Margin="0,4,-5,0">
|
||
<TextBlock Text=">" FontFamily="Symbol" FontSize="22" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||
<TextBlock.LayoutTransform>
|
||
<RotateTransform Angle="90"/>
|
||
</TextBlock.LayoutTransform>
|
||
</TextBlock>
|
||
</Grid>
|
||
</Button>
|
||
<Button Name="BtnFingerDragMode" Content="单指
拖动" Visibility="Visible" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,25,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnFingerDragMode_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
<Button Name="BtnSelect" Content="选择
墨迹" Visibility="Visible" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnSelect_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
<Button Name="BtnPen" Content="笔" Visibility="Visible" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnPen_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
<Button Name="BtnErase" Content="橡皮" Visibility="Visible" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnErase_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
<Button Name="BtnDrawLine" Content="直线" Visibility="Visible" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,25,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnDrawLine_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
<Button Name="BtnDrawArrow" Content="箭头" Visibility="Visible" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnDrawArrow_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
<Button Name="BtnDrawRectangle" Content="矩形" Visibility="Visible" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnDrawRectangle_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
<Button Name="BtnDrawEllipse" Content="椭圆" Visibility="Visible" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,15" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnDrawEllipse_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
<StackPanel Visibility="{Binding ElementName=StackPanelPPTButtons, Path=Visibility}">
|
||
<StackPanel Visibility="{Binding ElementName=StackPanelPPTControls, Path=Visibility}">
|
||
<Button Content="↑" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnPPTSlidesUp_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
<Button Content="↓" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,15" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnPPTSlidesDown_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
</StackPanel>
|
||
</StackPanel>
|
||
<Button Content="清屏" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnClear_Click" MouseDoubleClick="BtnClear_MouseDoubleClick" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
<Button x:Name="BtnUndo" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnUndo_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}"
|
||
Background="{Binding ElementName=BtnExit, Path=Background}"
|
||
IsEnabled="False" IsEnabledChanged="Btn_IsEnabledChanged">
|
||
<StackPanel Opacity="0.2">
|
||
<ui:SymbolIcon Symbol="Undo"/>
|
||
<TextBlock Text="撤销" Margin="0,4,0,0"/>
|
||
</StackPanel>
|
||
</Button>
|
||
<Button x:Name="BtnRedo" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
|
||
Click="BtnRedo_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}"
|
||
Background="{Binding ElementName=BtnExit, Path=Background}"
|
||
IsEnabled="False" Visibility="Collapsed" IsEnabledChanged="Btn_IsEnabledChanged">
|
||
<StackPanel Opacity="0.2">
|
||
<ui:SymbolIcon Symbol="Redo"/>
|
||
<TextBlock Text="恢复" Margin="0,4,0,0"/>
|
||
</StackPanel>
|
||
</Button>
|
||
<Button Name="BtnClearAndHideCanvas" Content="清屏
&
隐藏" Visibility="Collapsed" FontFamily="Microsoft YaHei UI"
|
||
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}" Block.TextAlignment="Center"
|
||
Click="BtnSelect_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
|
||
<Grid Height="{Binding ElementName=StackPanelInfo, Path=ActualHeight}"/>
|
||
</StackPanel>
|
||
</Viewbox>
|
||
</Grid>
|
||
</Window>
|