<UserControl x:Class="XHandler.View.Consumables.BaseInfo"
|
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.Consumables"
|
xmlns:str="clr-namespace:XHandler.Properties"
|
xmlns:ctrls="clr-namespace:XHandler.Controls"
|
mc:Ignorable="d"
|
d:DesignHeight="450" d:DesignWidth="800">
|
<Grid IsEnabled="{Binding is_default_type, Converter={StaticResource intToEnableConvert}}">
|
<Grid.RowDefinitions>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="30"/>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="30"/>
|
<RowDefinition Height="40"/>
|
<RowDefinition Height="30"/>
|
<RowDefinition Height="*"/>
|
</Grid.RowDefinitions>
|
<Grid.ColumnDefinitions>
|
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="0.6*"/>
|
</Grid.ColumnDefinitions>
|
<TextBlock Grid.Row="0" Grid.Column="0" Text="{x:Static str:Resources.strBaseInfo}" VerticalAlignment="Center" Margin="20 0 0 0"
|
FontSize="20" FontWeight="Black"/>
|
|
<TextBlock Grid.Row="1" Grid.Column="0" Text="{x:Static str:Resources.strName}" VerticalAlignment="Bottom" Margin="20 0 0 0"
|
FontSize="16"/>
|
<!--<TextBox Grid.Row="2" Grid.Column="0" Height="30" FontSize="16" VerticalContentAlignment="Center" Margin="20 0 0 0" Background="{DynamicResource lightGrayBrush}"
|
BorderThickness="0" Text="{Binding labware_name, Mode=TwoWay}"/>-->
|
<TextBox x:Name="txtlabware_name" Grid.Row="2" Grid.Column="0" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
|
BorderThickness="0" >
|
<TextBox.Text>
|
<Binding Path="labware_name" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
|
<Binding.ValidationRules>
|
<local:ConsumablesValidationRule ValidateType="1,6@[256]"/>
|
</Binding.ValidationRules>
|
</Binding>
|
</TextBox.Text>
|
</TextBox>
|
<TextBlock Grid.Row="1" Grid.Column="0" x:Name="lnError" Text="{Binding ElementName=txtlabware_name,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
|
|
<TextBlock Grid.Row="1" Grid.Column="1" Text="{x:Static str:Resources.strConsumableType}" VerticalAlignment="Bottom" Margin="20 0 0 0"
|
FontSize="16"/>
|
<ComboBox x:Name="cbConsumableType" Grid.Row="2" Grid.Column="1" Height="30" BorderThickness="0" Background="{DynamicResource lightGrayBrush}" Margin="20 0 0 0"
|
DisplayMemberPath="labwaretype_name" SelectedValuePath="labwaretype_id" SelectionChanged="cbConsumableType_SelectionChanged" IsEditable="False"
|
IsEnabled="False"/>
|
|
<TextBlock Grid.Row="3" Grid.Column="0" Text="{x:Static str:Resources.strManufacturer}" VerticalAlignment="Bottom" Margin="20 0 0 0"
|
FontSize="16"/>
|
<!--<TextBox Grid.Row="4" Grid.Column="0" Height="30" FontSize="16" VerticalContentAlignment="Center" Margin="20 0 0 0" Background="{DynamicResource lightGrayBrush}"
|
BorderThickness="0" Text="{Binding brand, Mode=TwoWay}"/>-->
|
<TextBox x:Name="txtbrand" Grid.Row="4" Grid.Column="0" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
|
BorderThickness="0" >
|
<TextBox.Text>
|
<Binding Path="brand" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
|
<Binding.ValidationRules>
|
<local:ConsumablesValidationRule ValidateType="1,6@[256]"/>
|
</Binding.ValidationRules>
|
</Binding>
|
</TextBox.Text>
|
</TextBox>
|
<TextBlock Grid.Row="3" Grid.Column="0" x:Name="bError" Text="{Binding ElementName=txtbrand,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
|
|
<TextBlock Grid.Row="3" Grid.Column="1" Text="{x:Static str:Resources.strProductNo}" VerticalAlignment="Bottom" Margin="20 0 0 0"
|
FontSize="16"/>
|
<!--<TextBox Grid.Row="4" Grid.Column="1" Height="30" FontSize="16" VerticalContentAlignment="Center" Margin="20 0 0 0" Background="{DynamicResource lightGrayBrush}"
|
BorderThickness="0" Text="{Binding number, Mode=TwoWay}"/>-->
|
<TextBox x:Name="txtnumber" Grid.Row="4" Grid.Column="1" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
|
BorderThickness="0" >
|
<TextBox.Text>
|
<Binding Path="number" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
|
<Binding.ValidationRules>
|
<local:ConsumablesValidationRule ValidateType="1,6@[256]"/>
|
</Binding.ValidationRules>
|
</Binding>
|
</TextBox.Text>
|
</TextBox>
|
<TextBlock Grid.Row="3" Grid.Column="1" x:Name="nError" Text="{Binding ElementName=txtnumber,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
|
|
<TextBlock Grid.Row="5" Grid.Column="0" Text="{x:Static str:Resources.strDescription}" VerticalAlignment="Bottom" Margin="20 0 0 0"
|
FontSize="16"/>
|
<!--<TextBox Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="2" FontSize="16" VerticalContentAlignment="Top" Margin="20 8 0 0" TextWrapping="Wrap" Background="{DynamicResource lightGrayBrush}"
|
BorderThickness="0" Text="{Binding content,Mode=TwoWay}"/>-->
|
<TextBox x:Name="txtcontent" Grid.Row="6" Grid.Column="0" Grid.ColumnSpan="2" FontSize="16" VerticalContentAlignment="Top" Margin="20 8 0 0" TextWrapping="Wrap" Background="{DynamicResource lightGrayBrush}"
|
BorderThickness="0" >
|
<TextBox.Text>
|
<Binding Path="content" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
|
<Binding.ValidationRules>
|
<local:ConsumablesValidationRule ValidateType="1,6@[1024]"/>
|
</Binding.ValidationRules>
|
</Binding>
|
</TextBox.Text>
|
</TextBox>
|
<TextBlock Grid.Row="5" Grid.Column="0" x:Name="cError" Text="{Binding ElementName=txtcontent,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16"
|
VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
|
|
<Border Grid.Row="1" Grid.Column="2" Grid.RowSpan="6" BorderThickness="0" Background="#FFF2F3F5" CornerRadius="5" Margin="40 0 0 10">
|
<Grid>
|
<Image x:Name="imageConsumable" Stretch="Uniform" Source="pack://application:,,,./Assets/Consumables/无图片.png"/>
|
<ctrls:ImageButton Grid.Column="3" x:Name="btnUpload" NormalImage="pack://application:,,,./Assets/Consumables/上传.png" Width="40" Height="40" ImageWidth="28" ImageHeight="28" VerticalAlignment="Top" HorizontalAlignment="Right"
|
Click="btnUpload_Click" Margin="0 10 50 0"/>
|
<ctrls:ImageButton Grid.Column="3" x:Name="btnDelete" NormalImage="pack://application:,,,./Assets/Consumables/删除.png" Width="40" Height="40" ImageWidth="28" ImageHeight="28" VerticalAlignment="Top" HorizontalAlignment="Right"
|
Click="btnDelete_Click" Margin="0 10 10 0"/>
|
</Grid>
|
<!--<Border.Triggers>
|
<EventTrigger RoutedEvent="Mouse.MouseEnter">
|
<BeginStoryboard>
|
<Storyboard>
|
<ColorAnimation Duration="0:0:0.5" Storyboard.TargetProperty="Background.Color" To="LightGray" />
|
</Storyboard>
|
</BeginStoryboard>
|
</EventTrigger>
|
</Border.Triggers>-->
|
</Border>
|
</Grid>
|
|
</UserControl>
|