| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- <UserControl x:Class="TeamAAS_VP.Controls.AflexControl"
- 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:TeamAAS_VP.Controls"
- xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
- xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
- xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:lex="http://wpflocalizeextension.codeplex.com"
- lex:LocalizeDictionary.DesignCulture="zh-CN"
- lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
- lex:ResxLocalizationProvider.DefaultDictionary="Lang"
- mc:Ignorable="d"
- d:DesignHeight="450"
- d:DesignWidth="800"
- d:Background="White"
- FontFamily="{DynamicResource DefaultFont}">
- <Grid Margin="20">
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- <RowDefinition Height="auto" />
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="auto" />
- <ColumnDefinition Width="auto" />
- </Grid.ColumnDefinitions>
- <Grid.Resources>
- <Style TargetType="TextBlock">
- <Setter Property="HorizontalAlignment"
- Value="Right" />
- <Setter Property="VerticalAlignment"
- Value="Center" />
- <Setter Property="Margin"
- Value="10,0" />
- <Setter Property="Grid.Column"
- Value="0" />
- </Style>
- <Style TargetType="Button"
- BasedOn="{StaticResource MaterialDesignRaisedButton}">
- <Setter Property="Margin"
- Value="10,5" />
- <Setter Property="HorizontalAlignment"
- Value="Center" />
- <Setter Property="VerticalAlignment"
- Value="Center" />
- <Setter Property="Grid.Column"
- Value="2" />
- </Style>
- <Style TargetType="mah:NumericUpDown">
- <Setter Property="HorizontalAlignment"
- Value="Center" />
- <Setter Property="VerticalAlignment"
- Value="Center" />
- <Setter Property="Grid.Column"
- Value="1" />
- </Style>
- </Grid.Resources>
- <!--选择配置-->
- <TextBlock Grid.Row="0"
- Text="{lex:Loc 选择配置,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <ComboBox Grid.Row="0"
- Grid.Column="1"
- MinWidth="60"
- SelectedIndex="{Binding ConfigIndex}"
- materialDesign:HintAssist.Hint="{lex:Loc 配置编号}">
- <ComboBoxItem>
- <TextBlock Text="1|Flip"
- VerticalAlignment="Center" />
- </ComboBoxItem>
- <ComboBoxItem>
- <TextBlock Text="2|Move"
- VerticalAlignment="Center" />
- </ComboBoxItem>
- <ComboBoxItem>
- <TextBlock Text="3|Flip"
- VerticalAlignment="Center" />
- </ComboBoxItem>
- <ComboBoxItem>
- <TextBlock Text="4|Move"
- VerticalAlignment="Center" />
- </ComboBoxItem>
- <ComboBoxItem>
- <TextBlock Text="5|"
- VerticalAlignment="Center" />
- </ComboBoxItem>
- <ComboBoxItem>
- <TextBlock Text="6|"
- VerticalAlignment="Center" />
- </ComboBoxItem>
- <ComboBoxItem>
- <TextBlock Text="7|"
- VerticalAlignment="Center" />
- </ComboBoxItem>
- <ComboBoxItem>
- <TextBlock Text="8|"
- VerticalAlignment="Center" />
- </ComboBoxItem>
- <ComboBoxItem>
- <TextBlock Text="9|"
- VerticalAlignment="Center" />
- </ComboBoxItem>
- <ComboBoxItem>
- <TextBlock Text="10|"
- VerticalAlignment="Center" />
- </ComboBoxItem>
- <ComboBoxItem>
- <TextBlock Text="11|"
- VerticalAlignment="Center" />
- </ComboBoxItem>
- <ComboBoxItem>
- <TextBlock Text="12|"
- VerticalAlignment="Center" />
- </ComboBoxItem>
- <ComboBoxItem>
- <TextBlock Text="13|"
- VerticalAlignment="Center" />
- </ComboBoxItem>
- </ComboBox>
- <Button Grid.Row="0"
- Content="{lex:Loc 确定}"
- Command="{Binding ActionCommand}"
- CommandParameter="1"/>
- <!--强度-->
- <TextBlock Grid.Row="1"
- Text="{lex:Loc 振动强度,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <mah:NumericUpDown Grid.Row="1"
- Maximum="100"
- Minimum="0"
- Interval="0.1"
- materialDesign:HintAssist.Hint="{lex:Loc 振动强度}"
- StringFormat="{}{0:N1} %"
- Value="{Binding Intensity,Mode=TwoWay}"/>
- <Button Grid.Row="1"
- Content="{lex:Loc 确定}"
- Command="{Binding ActionCommand}"
- CommandParameter="2" />
- <!--方向-->
- <TextBlock Grid.Row="2"
- Text="{lex:Loc 振动方向,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <mah:NumericUpDown Grid.Row="2"
- Maximum="360"
- Minimum="0"
- Interval="0.1"
- materialDesign:HintAssist.Hint="{lex:Loc 振动方向}"
- StringFormat="{}{0:N1} °"
- Value="{Binding Direction,Mode=TwoWay}" />
- <Button Grid.Row="2"
- Content="{lex:Loc 确定}"
- Command="{Binding ActionCommand}"
- CommandParameter="3" />
- <!--背光亮度-->
- <TextBlock Grid.Row="3"
- Text="{lex:Loc 背光亮度,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}: '}" />
- <mah:NumericUpDown Grid.Row="3"
- Maximum="100"
- Minimum="0"
- Interval="0.1"
- materialDesign:HintAssist.Hint="{lex:Loc 背光亮度}"
- StringFormat="{}{0:N1} %"
- Value="{Binding Backlight,Mode=TwoWay}" />
- <Button Grid.Row="3"
- Content="{lex:Loc 确定}"
- Command="{Binding ActionCommand}"
- CommandParameter="4" />
- </Grid>
- </UserControl>
|