<UserControl x:Class="XHandler.View.MethodProperty.ShakeProperty"
|
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:XHandler.View.MethodProperty"
|
xmlns:str="clr-namespace:XHandler.Properties"
|
xmlns:ctrls="clr-namespace:XHandler.Controls"
|
xmlns:valide="clr-namespace:XHandler.View.Consumables"
|
mc:Ignorable="d"
|
d:DesignHeight="450" d:DesignWidth="800" Loaded="UserControl_Loaded">
|
<Grid>
|
<Grid.RowDefinitions>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="auto"/>
|
<RowDefinition Height="*"/>
|
</Grid.RowDefinitions>
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="125"/>
|
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width=".9*"/>
|
</Grid.ColumnDefinitions>
|
<TextBlock Grid.Row="0" Grid.Column="0" Text="{x:Static str:Resources.strCommandTag}" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 15 0"/>
|
<TextBlock Grid.Row="1" Grid.Column="0" Text="{x:Static str:Resources.strCommandName}" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 15 0"/>
|
|
<TextBox Grid.Row="0" Grid.Column="1" x:Name="tbxCommandLabel" Height="30" FontSize="16" VerticalContentAlignment="Center" BorderThickness="0" Background="{DynamicResource lightGrayBrush}"
|
Text="{Binding label, Mode=TwoWay}" IsEnabled="False"/>
|
<!--<TextBox Grid.Row="1" Grid.Column="1" x:Name="tbxCommandName" Height="30" FontSize="16" VerticalContentAlignment="Center" BorderThickness="0" Background="{DynamicResource lightGrayBrush}"
|
Text="{Binding name}" TextChanged="tbxCommandName_TextChanged"/>-->
|
<TextBox x:Name="tbxCommandName" Grid.Row="1" Grid.Column="1" Height="30" FontSize="16" VerticalContentAlignment="Center" Background="{DynamicResource lightGrayBrush}"
|
BorderThickness="0" TextChanged="tbxCommandName_TextChanged">
|
<TextBox.Text>
|
<Binding Path="name" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
|
<Binding.ValidationRules>
|
<local:AspirateValidationRule ValidateType="tbxCommandName"/>
|
</Binding.ValidationRules>
|
</Binding>
|
</TextBox.Text>
|
</TextBox>
|
<TextBlock Grid.Row="1" Grid.Column="2" x:Name="nError" Text="{Binding ElementName=tbxCommandName,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
|
|
<TextBlock Grid.Row="2" Grid.Column="0" Text="{x:Static str:Resources.strMode}" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 15 0"/>
|
<StackPanel Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" Orientation="Horizontal">
|
<RadioButton x:Name="radioBtnShake" Grid.Row="2" Grid.Column="0" Content="{x:Static str:Resources.strShakeInfo}" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 0 15 0" Checked="radioBtnShake_Checked"/>
|
<RadioButton x:Name="radioBtnMove" Grid.Row="2" Grid.Column="0" Content="{x:Static str:Resources.strMoveInfo}" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 0 15 0" Checked="radioBtnMove_Checked"/>
|
</StackPanel>
|
|
<Grid Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="3" x:Name="gridShakeParams" Visibility="Visible">
|
<Grid.RowDefinitions>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="40"/>
|
</Grid.RowDefinitions>
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="125"/>
|
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
</Grid.ColumnDefinitions>
|
<TextBlock Grid.Row="0" Grid.Column="0" Text="{x:Static str:Resources.strShakeSpeed}" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 15 0"/>
|
<TextBox x:Name="tbxShakeSpeed" Grid.Row="0" Grid.Column="1" Height="30" FontSize="16" VerticalContentAlignment="Center" Background="{DynamicResource lightGrayBrush}"
|
BorderThickness="0" TextChanged="tbxShakeSpeed_TextChanged">
|
<TextBox.Text>
|
<Binding Path="shakeSpeed" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
|
<Binding.ValidationRules>
|
<valide:ConsumablesValidationRule ValidateType="1,4@[2],5@(0-5]"/>
|
</Binding.ValidationRules>
|
</Binding>
|
</TextBox.Text>
|
</TextBox>
|
<TextBlock Grid.Row="0" Grid.Column="2" Text="{x:Static str:Resources.strShakeSpeedUnit}" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10 0 0 0"/>
|
<TextBlock Grid.Row="0" Grid.Column="2" x:Name="tbkErrorShakeSpeed" Text="{Binding ElementName=tbxShakeSpeed,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
|
|
<TextBlock Grid.Row="1" Grid.Column="0" Text="{x:Static str:Resources.strShakeDuringTime}" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 15 0"/>
|
<TextBox x:Name="tbxShakeDuringTime" Grid.Row="1" Grid.Column="1" Height="30" FontSize="16" VerticalContentAlignment="Center" Background="{DynamicResource lightGrayBrush}"
|
BorderThickness="0" TextChanged="tbxShakeDuringTime_TextChanged">
|
<TextBox.Text>
|
<Binding Path="shakeDuringTime" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
|
<Binding.ValidationRules>
|
<valide:ConsumablesValidationRule ValidateType="1,4@[0],5@[0-10000000]"/>
|
</Binding.ValidationRules>
|
</Binding>
|
</TextBox.Text>
|
</TextBox>
|
<TextBlock Grid.Row="1" Grid.Column="2" Text="{x:Static str:Resources.strSecondUnit}" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10 0 0 0"/>
|
</Grid>
|
|
<Grid Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="3" x:Name="gridMoveParams" Visibility="Collapsed">
|
<Grid.RowDefinitions>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="40"/>
|
</Grid.RowDefinitions>
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="125"/>
|
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
</Grid.ColumnDefinitions>
|
<TextBlock Grid.Row="0" Grid.Column="0" Text="{x:Static str:Resources.strShakeMoveSpeed}" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 0 0"/>
|
<TextBox x:Name="tbxShakeMoveSpeed" Grid.Row="0" Grid.Column="1" Height="30" FontSize="16" VerticalContentAlignment="Center" Background="{DynamicResource lightGrayBrush}"
|
BorderThickness="0" TextChanged="tbxShakeMoveSpeed_TextChanged">
|
<TextBox.Text>
|
<Binding Path="shakeMoveSpeed" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
|
<Binding.ValidationRules>
|
<valide:ConsumablesValidationRule ValidateType="1,4@[0],5@[0-100]"/>
|
</Binding.ValidationRules>
|
</Binding>
|
</TextBox.Text>
|
</TextBox>
|
|
<TextBlock Grid.Row="1" Grid.Column="0" Text="{x:Static str:Resources.strShakeAngle}" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 0 0"/>
|
<TextBox x:Name="tbxShakeMoveAngle" Grid.Row="1" Grid.Column="1" Height="30" FontSize="16" VerticalContentAlignment="Center" Background="{DynamicResource lightGrayBrush}"
|
BorderThickness="0" TextChanged="tbxShakeMoveAngle_TextChanged">
|
<TextBox.Text>
|
<Binding Path="shakeMoveAngle" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
|
<Binding.ValidationRules>
|
<valide:ConsumablesValidationRule ValidateType="1,4@[1],5@[0-360]"/>
|
</Binding.ValidationRules>
|
</Binding>
|
</TextBox.Text>
|
</TextBox>
|
</Grid>
|
</Grid>
|
</UserControl>
|