<Window x:Class="Aitex.Core.UI.DeviceControl.AITBoostPumpInputDialogBox" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:my="clr-namespace:Aitex.Core.UI.Control" Height="265" Width="310" MaxHeight="265" MinHeight="265" MaxWidth="310" MinWidth="310" WindowStyle="ToolWindow" WindowStartupLocation="CenterOwner" KeyDown="OnEnterKeyIsHit" Title="{Binding Path=DeviceId, StringFormat={}{0} SetPoint}"> <Window.Resources> <Style TargetType="Button"> <Setter Property="FontSize" Value="12" /> <Setter Property="Height" Value="23" /> <Setter Property="HorizontalAlignment" Value="Left" /> <Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="Width" Value="50" /> </Style> <Style TargetType="Label"> <Setter Property="FontFamily" Value="Arial" /> <Setter Property="FontSize" Value="13" /> <Setter Property="HorizontalAlignment" Value="Right" /> <Setter Property="VerticalAlignment" Value="Top" /> <Setter Property="Height" Value="25" /> </Style> <Style x:Key="textBoxInError" TargetType="{x:Type TextBox}"> <Style.Triggers> <Trigger Property="Validation.HasError" Value="true"> <Setter Property="ToolTip" Value="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=(Validation.Errors)[0].ErrorContent}"/> </Trigger> </Style.Triggers> </Style> <my:DoubleConverter x:Key="doubleConverter"/> </Window.Resources> <Grid> <Grid.RowDefinitions> <RowDefinition/> <RowDefinition/> <RowDefinition/> <RowDefinition/> <RowDefinition/> <RowDefinition/> <RowDefinition/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="1*"/> <ColumnDefinition Width="auto"/> <ColumnDefinition Width="auto"/> <ColumnDefinition Width="1*"/> </Grid.ColumnDefinitions> <Label Grid.Row="0" Grid.Column="1" Content="Device Name:" /> <Label Grid.Row="1" Grid.Column="1" Content="Unit:" /> <Label Grid.Row="2" Grid.Column="1" Content="Max:" /> <Label Grid.Row="3" Grid.Column="1" Content="Frequency:" /> <Label Grid.Row="4" Grid.Column="1" Content="CurrentSetPoint:" /> <Label Grid.Row="5" Grid.Column="1" Content="Set Pressure:" /> <Label Grid.Row="0" Grid.Column="2" Content="{Binding Path=DeviceName}" Width="150" Height="28" HorizontalAlignment="Left" BorderThickness="0,0,0,1" BorderBrush="Black" FontSize="13" FontFamily="Microsoft YaHei" VerticalContentAlignment="Center" /> <Label Grid.Row="1" Grid.Column="2" Content="{Binding Path=Unit}" Width="150" BorderThickness="0,0,0,1" BorderBrush="Black" FontSize="13" FontFamily="Microsoft YaHei" Height="28" VerticalContentAlignment="Center" /> <Label Grid.Row="2" Grid.Column="2" Content="{Binding Path=MaxValue}" Width="150" BorderThickness="0,0,0,1" BorderBrush="Black" FontSize="13" FontFamily="Microsoft YaHei" Height="28" VerticalContentAlignment="Center" /> <Label Grid.Row="3" Grid.Column="2" Content="{Binding Path=Frequency}" Width="150" BorderThickness="0,0,0,1" BorderBrush="Black" FontSize="13" FontFamily="Microsoft YaHei" Height="28" VerticalContentAlignment="Center" /> <Label Grid.Row="4" Grid.Column="2" Content="{Binding Path=RealValue}" Width="150" BorderThickness="0,0,0,1" BorderBrush="Black" FontSize="13" FontFamily="Microsoft YaHei" Height="28" VerticalContentAlignment="Center" /> <TextBox Grid.Row="5" Grid.Column="2" x:Name="inputBox" BorderBrush="Green" BorderThickness="0,0,0,1" Style="{StaticResource textBoxInError}" TextChanged="InputTextBox_TextChanged" Width="150" HorizontalAlignment="Left" FontSize="13" FontFamily="Microsoft YaHei" Height="30" VerticalContentAlignment="Center" /> <StackPanel Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="4" Orientation="Horizontal" HorizontalAlignment="Center"> <Button Content="Set" x:Name="btnSet" Click="ButtonSet_Click" Width="60" Height="26" VerticalAlignment="Top" Margin="5,3,0,0" /> <Button Content="Cancel" Click="ButtonCancel_Click" Width="60" Height="26" VerticalAlignment="Top" Margin="50,3,0,0" /> </StackPanel> </Grid> </Window>