downkyi/DownKyi/Views/Settings/ViewDanmaku.xaml

201 lines
8.8 KiB

<UserControl
x:Class="DownKyi.Views.Settings.ViewDanmaku"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:prism="http://prismlibrary.com/"
prism:ViewModelLocator.AutoWireViewModel="True">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
<StackPanel Margin="50,0" Orientation="Vertical">
<StackPanel Margin="0,20,0,0" Orientation="Horizontal">
<TextBlock
FontSize="18"
Foreground="{DynamicResource BrushTextDark}"
Text="{DynamicResource SettingDanmaku}" />
</StackPanel>
<GroupBox
Margin="0,20,0,0"
Padding="20,5"
HorizontalAlignment="Left">
<GroupBox.Header>
<TextBlock
FontSize="12"
Foreground="{DynamicResource BrushTextDark}"
Text="{DynamicResource FilterType}" />
</GroupBox.Header>
<StackPanel Margin="0,10,0,0" Orientation="Horizontal">
<CheckBox
Margin="0,0,0,0"
Command="{Binding TopFilterCommand}"
Content="{DynamicResource TopFilter}"
Foreground="{DynamicResource BrushTextDark}"
IsChecked="{Binding TopFilter, Mode=TwoWay}"
Style="{StaticResource CheckBoxStyle}" />
<CheckBox
3 years ago
Margin="40,0,0,0"
Command="{Binding BottomFilterCommand}"
Content="{DynamicResource BottomFilter}"
Foreground="{DynamicResource BrushTextDark}"
IsChecked="{Binding BottomFilter, Mode=TwoWay}"
Style="{StaticResource CheckBoxStyle}" />
<CheckBox
3 years ago
Margin="40,0,0,0"
Command="{Binding ScrollFilterCommand}"
Content="{DynamicResource ScrollFilter}"
Foreground="{DynamicResource BrushTextDark}"
IsChecked="{Binding ScrollFilter, Mode=TwoWay}"
Style="{StaticResource CheckBoxStyle}" />
</StackPanel>
</GroupBox>
<StackPanel
Margin="0,20,0,0"
Orientation="Horizontal"
ToolTip="{DynamicResource PressEnterToApplySettingTip}">
<TextBlock
VerticalAlignment="Center"
FontSize="12"
Foreground="{DynamicResource BrushTextDark}"
Text="{DynamicResource Resolution}" />
<TextBox
Name="nameScreenWidth"
Width="95"
Height="20"
VerticalContentAlignment="Center"
Text="{Binding ScreenWidth, Mode=TwoWay}">
<TextBox.InputBindings>
<KeyBinding
Key="Enter"
Command="{Binding ScreenWidthCommand}"
CommandParameter="{Binding ElementName=nameScreenWidth, Path=Text}" />
</TextBox.InputBindings>
</TextBox>
<TextBlock
Margin="5,0"
VerticalAlignment="Center"
FontSize="12"
Foreground="{DynamicResource BrushTextDark}"
Text="×" />
<TextBox
Name="nameScreenHeight"
Width="95"
Height="20"
VerticalContentAlignment="Center"
Text="{Binding ScreenHeight, Mode=TwoWay}">
<TextBox.InputBindings>
<KeyBinding
Key="Enter"
Command="{Binding ScreenHeightCommand}"
CommandParameter="{Binding ElementName=nameScreenHeight, Path=Text}" />
</TextBox.InputBindings>
</TextBox>
</StackPanel>
<StackPanel Margin="0,20,0,0" Orientation="Horizontal">
<TextBlock
VerticalAlignment="Center"
FontSize="12"
Foreground="{DynamicResource BrushTextDark}"
Text="{DynamicResource FontName}" />
<ComboBox
Name="nameFonts"
Width="200"
VerticalContentAlignment="Center"
ItemsSource="{Binding Fonts}"
SelectedValue="{Binding SelectedFont}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<i:InvokeCommandAction Command="{Binding FontSelectCommand}" CommandParameter="{Binding ElementName=nameFonts, Path=SelectedValue}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</ComboBox>
</StackPanel>
<StackPanel
Margin="0,20,0,0"
Orientation="Horizontal"
ToolTip="{DynamicResource PressEnterToApplySettingTip}">
<TextBlock
VerticalAlignment="Center"
FontSize="12"
Foreground="{DynamicResource BrushTextDark}"
Text="{DynamicResource FontSize}" />
<TextBox
x:Name="nameFontSize"
Width="200"
Height="20"
VerticalContentAlignment="Center"
Text="{Binding FontSize}">
<TextBox.InputBindings>
<KeyBinding
Key="Enter"
Command="{Binding FontSizeCommand}"
CommandParameter="{Binding ElementName=nameFontSize, Path=Text}" />
</TextBox.InputBindings>
</TextBox>
</StackPanel>
<StackPanel
Margin="0,20,0,0"
Orientation="Horizontal"
ToolTip="{DynamicResource PressEnterToApplySettingTip}">
<TextBlock
VerticalAlignment="Center"
FontSize="12"
Foreground="{DynamicResource BrushTextDark}"
Text="{DynamicResource LineCount}" />
<TextBox
Name="nameLineCount"
Width="200"
Height="20"
VerticalContentAlignment="Center"
Text="{Binding LineCount}">
<TextBox.InputBindings>
<KeyBinding
Key="Enter"
Command="{Binding LineCountCommand}"
CommandParameter="{Binding ElementName=nameLineCount, Path=Text}" />
</TextBox.InputBindings>
</TextBox>
</StackPanel>
<StackPanel Margin="0,20,0,0" Orientation="Horizontal">
<TextBlock
VerticalAlignment="Center"
FontSize="12"
Foreground="{DynamicResource BrushTextDark}"
Text="{DynamicResource LayoutAlgorithm}" />
<CheckBox
HorizontalAlignment="Left"
VerticalAlignment="Top"
Command="{Binding LayoutAlgorithmCommand}"
CommandParameter="Sync"
Content="{DynamicResource LayoutAlgorithmSync}"
FontSize="12"
Foreground="{DynamicResource BrushTextDark}"
IsChecked="{Binding Sync, Mode=TwoWay}"
Style="{StaticResource CheckBoxStyle}"
ToolTip="{DynamicResource LayoutAlgorithmSyncTip}" />
<CheckBox
Margin="20,0,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Command="{Binding LayoutAlgorithmCommand}"
CommandParameter="Async"
Content="{DynamicResource LayoutAlgorithmAsync}"
FontSize="12"
Foreground="{DynamicResource BrushTextDark}"
IsChecked="{Binding Async, Mode=TwoWay}"
Style="{StaticResource CheckBoxStyle}"
ToolTip="{DynamicResource LayoutAlgorithmAsyncTip}" />
</StackPanel>
<StackPanel Margin="10" />
</StackPanel>
</ScrollViewer>
</UserControl>