Files
community/Ink Canvas/Windows/SettingsViews/Pages/GesturePage.xaml
T
PrefacedCorg b949b1651a add:新设置
2026-04-23 06:48:52 +08:00

79 lines
4.4 KiB
XML

<ui:Page x:Class="Ink_Canvas.Windows.SettingsViews.Pages.GesturePage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Ink_Canvas.Windows.SettingsViews.Pages"
xmlns:helpers="clr-namespace:Ink_Canvas.Windows.SettingsViews.Helpers"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
xmlns:i18n="clr-namespace:Ink_Canvas.MarkupExtensions"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:controls="clr-namespace:Ink_Canvas.Controls;assembly=InkCanvas.Controls"
xmlns:c="clr-namespace:Ink_Canvas.Converter"
mc:Ignorable="d"
Title="手势">
<ScrollViewer PanningMode="VerticalFirst">
<Grid Margin="59,0,59,0">
<FrameworkElement.Resources>
<sys:Double x:Key="SettingsCardSpacing">4</sys:Double>
<c:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
<Style x:Key="SettingsSectionHeaderTextBlockStyle"
BasedOn="{StaticResource BodyStrongTextBlockStyle}"
TargetType="TextBlock">
<Style.Setters>
<Setter Property="Margin" Value="1,30,0,6" />
</Style.Setters>
</Style>
</FrameworkElement.Resources>
<Grid>
<ikw:SimpleStackPanel MaxWidth="1000"
HorizontalAlignment="Stretch"
Spacing="{StaticResource SettingsCardSpacing}">
<TextBlock Style="{StaticResource SettingsSectionHeaderTextBlockStyle}"
Text="{i18n:I18n Key=Gesture_Title}" />
<controls:LabeledSettingsCard x:Name="CardAutoSwitchTwoFingerGesture"
Header="{i18n:I18n Key=Gesture_AutoToggleTwoFinger}"
Description="{i18n:I18n Key=Gesture_AutoToggleHint}"
Icon="{x:Static ui:SegoeFluentIcons.Touch}"
SwitchName="ToggleSwitchAutoSwitchTwoFingerGesture"
Toggled="ToggleSwitchAutoSwitchTwoFingerGesture_Toggled" />
<controls:LabeledSettingsCard x:Name="CardEnableTwoFingerRotationOnSelection"
Header="{i18n:I18n Key=Gesture_AllowRotateScale}"
Description="{i18n:I18n Key=Gesture_AllowRotateScaleHint}"
Icon="{x:Static ui:SegoeFluentIcons.Rotate}"
SwitchName="ToggleSwitchEnableTwoFingerRotationOnSelection"
Toggled="ToggleSwitchEnableTwoFingerRotationOnSelection_Toggled" />
<controls:LabeledSettingsCard x:Name="CardEnablePalmEraser"
Header="{i18n:I18n Key=Gesture_EnablePalmEraser}"
Description="{i18n:I18n Key=Gesture_PalmHint}"
Icon="{x:Static ui:SegoeFluentIcons.EraseTool}"
SwitchName="ToggleSwitchEnablePalmEraser"
Toggled="ToggleSwitchEnablePalmEraser_Toggled" />
<ui:SettingsCard Header="{i18n:I18n Key=Gesture_PalmSensitivity}"
Visibility="{Binding ElementName=CardEnablePalmEraser, Path=IsOn, Converter={StaticResource BooleanToVisibilityConverter}}">
<ui:SettingsCard.HeaderIcon>
<ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.Settings}" />
</ui:SettingsCard.HeaderIcon>
<ComboBox x:Name="ComboBoxPalmEraserSensitivity"
SelectionChanged="ComboBoxPalmEraserSensitivity_SelectionChanged">
<ComboBoxItem Content="{i18n:I18n Key=Gesture_PalmSensitivityLow}" />
<ComboBoxItem Content="{i18n:I18n Key=Gesture_PalmSensitivityMedium}" />
<ComboBoxItem Content="{i18n:I18n Key=Gesture_PalmSensitivityHigh}" />
</ComboBox>
</ui:SettingsCard>
<Rectangle Height="48" />
</ikw:SimpleStackPanel>
</Grid>
</Grid>
</ScrollViewer>
</ui:Page>