schangxiang@126.com
2025-11-04 f5ed29dc26c7cd952d56ec5721a2efc43cd25992
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
<UserControl x:Class="XHandler.View.Consumables.TipBoxSetting"
             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"
             mc:Ignorable="d" 
             d:DesignHeight="2000" d:DesignWidth="800"
             xmlns:colorpicker="clr-namespace:XHandler.View.ColorPicker"
             Loaded="UserControl_Loaded">
 
    <Grid IsEnabled="{Binding is_default_type, Converter={StaticResource intToEnableConvert}}">
        <Grid.RowDefinitions>
            <RowDefinition Height="40"/>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" Margin="20 0">
            <TextBlock Grid.Row="1" Grid.Column="0" Text="{x:Static str:Resources.strGap}" VerticalAlignment="Center" FontSize="16" Margin="0 0 20 0"/>
            <CheckBox x:Name="checkboxWN" Width="60" Height="30" Style="{DynamicResource gapCheckBoxSytle}" Content="{x:Static str:Resources.strWN}"
                                     FontSize="16" Background="White" Margin="0 0 0 0" HorizontalAlignment="Center"
                                     VerticalContentAlignment="Center" Checked="CheckBox_Checked" Unchecked="CheckBox_Checked"/>
            <CheckBox x:Name="checkboxWS" Width="60" Height="30" Style="{DynamicResource gapCheckBoxSytle}" Content="{x:Static str:Resources.strWS}"
                                     FontSize="16" Background="White" Margin="-1 0 0 0" HorizontalAlignment="Center"
                                     VerticalContentAlignment="Center" Checked="CheckBox_Checked" Unchecked="CheckBox_Checked"/>
            <CheckBox x:Name="checkboxEN" Width="60" Height="30" Style="{DynamicResource gapCheckBoxSytle}" Content="{x:Static str:Resources.strEN}"
                                     FontSize="16" Background="White" Margin="-1 0 0 0" HorizontalAlignment="Center"
                                     VerticalContentAlignment="Center" Checked="CheckBox_Checked" Unchecked="CheckBox_Checked"/>
            <CheckBox x:Name="checkboxES" Width="60" Height="30" Style="{DynamicResource gapCheckBoxSytle}" Content="{x:Static str:Resources.strES}"
                                     FontSize="16" Background="White" Margin="-1 0 0 0" HorizontalAlignment="Center"
                                     VerticalContentAlignment="Center" Checked="CheckBox_Checked" Unchecked="CheckBox_Checked"/>
        </StackPanel>
        <Grid Grid.Row="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="50"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.3*"/>
                <ColumnDefinition Width="0.3*"/>
                <ColumnDefinition Width="0.4*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Row="0" Grid.Column="0" Text="{x:Static str:Resources.strConsumableColor}" VerticalAlignment="Center"
                               FontSize="16" Margin="20 0 0 0" FontWeight="Bold"/>
 
            <!--宽边-->   
            <TextBlock Grid.Row="1" Grid.Column="0" Text="{x:Static str:Resources.strWideSide}" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
            <!--<ComboBox x:Name="cbWideColor" Grid.Row="2" Grid.Column="0" Height="30" BorderThickness="0" VerticalAlignment="Top"
                      Margin="20 0 30 0" Style="{DynamicResource ColorComboBoxStyle}" IsEditable="False" SelectionChanged="cbWideColor_SelectionChanged"
                      />-->
            <colorpicker:ColorPickerBtn x:Name="btnWideColor" Grid.Row="2" Grid.Column="0" Height="30" VerticalAlignment="Top"
                                         Margin="20 0 30 0" SelectedColorChangedEvent="btnWideColor_SelectedColorChangedEvent"/>
 
            <!--窄边-->
            <TextBlock Grid.Row="1" Grid.Column="1" Text="{x:Static str:Resources.strNarrowSide}" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
            <!--<ComboBox x:Name="cbSideColor" Grid.Row="2" Grid.Column="1" Height="30" BorderThickness="0" VerticalAlignment="Top"
                              Margin="20 0 30 0" Style="{DynamicResource ColorComboBoxStyle}" IsEditable="False" SelectionChanged="cbSideColor_SelectionChanged"/>-->
            <colorpicker:ColorPickerBtn x:Name="btnLeftSideColor" Grid.Row="2" Grid.Column="1" Height="30" VerticalAlignment="Top"
                                         Margin="20 0 30 0" SelectedColorChangedEvent="btnLeftSideColor_SelectedColorChangedEvent"/>
 
            <!--顶部-->   
            <TextBlock Grid.Row="3" Grid.Column="0" Text="{x:Static str:Resources.strTopSide}" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
            <!--<ComboBox x:Name="cbTopColor" Grid.Row="4" Grid.Column="0" Height="30" BorderThickness="0" VerticalAlignment="Top"
                              Margin="20 0 30 0" Style="{DynamicResource ColorComboBoxStyle}" IsEditable="False" SelectionChanged="cbTopColor_SelectionChanged"/>-->
            <colorpicker:ColorPickerBtn x:Name="btnTopColor" Grid.Row="4" Grid.Column="0" Height="30" VerticalAlignment="Top"
                                         Margin="20 0 30 0" SelectedColorChangedEvent="btnTopColor_SelectedColorChangedEvent"/>
 
            <!--边线-->
            <TextBlock Grid.Row="3" Grid.Column="1" Text="{x:Static str:Resources.strBorderLine}" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
            <!--<ComboBox x:Name="cbLineColor" Grid.Row="4" Grid.Column="1" Height="30" BorderThickness="0" VerticalAlignment="Top"
                              Margin="20 0 30 0" Style="{DynamicResource ColorComboBoxStyle}" SelectionChanged="cbLineColor_SelectionChanged" IsEditable="False"/>-->
            <colorpicker:ColorPickerBtn x:Name="btnLineColor" Grid.Row="4" Grid.Column="1" Height="30" VerticalAlignment="Top"
                                         Margin="20 0 30 0" SelectedColorChangedEvent="btnLineColor_SelectedColorChangedEvent"/>
            
            <Grid Grid.Row="0" Grid.Column="2" Grid.RowSpan="5" x:Name="gridGapLabware" Margin="50 10 0 0">
            </Grid>
        </Grid>
        <Grid Grid.Row="2">
            <Grid.RowDefinitions>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="auto"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Row="0" Grid.Column="0" Text="{x:Static str:Resources.strConsumableSize}" VerticalAlignment="Center"
                               FontSize="16" Margin="20 0 0 0" FontWeight="Bold"/>
            <TextBlock Grid.Row="1" Grid.Column="0" Text="L (mm)" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
            <TextBlock Grid.Row="1" Grid.Column="1" Text="W (mm)" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
            <TextBlock Grid.Row="1" Grid.Column="2" Text="H (mm)" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
            <!--<TextBox Grid.Row="2" Grid.Column="0" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
                     BorderThickness="0" Text="{Binding labware_length, Mode=TwoWay}"/>-->
            <TextBox x:Name="tblabware_length" 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_length" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
                        <Binding.ValidationRules>
                            <local:ConsumablesValidationRule  ValidateType="1,4@[2],5@[0-1000]"/>
                        </Binding.ValidationRules>
                    </Binding>
                </TextBox.Text>
            </TextBox>
            <TextBlock Grid.Row="1" Grid.Column="0" x:Name="lLError" Text="{Binding  ElementName=tblabware_length,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
            
            <!--<TextBox Grid.Row="2" Grid.Column="1" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
                     BorderThickness="0" Text="{Binding labware_width, Mode=TwoWay}"/>-->
            <TextBox x:Name="tblabware_width" Grid.Row="2" Grid.Column="1" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
                     BorderThickness="0" >
                <TextBox.Text>
                    <Binding Path="labware_width" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
                        <Binding.ValidationRules>
                            <local:ConsumablesValidationRule  ValidateType="1,4@[2],5@[0-1000]"/>
                        </Binding.ValidationRules>
                    </Binding>
                </TextBox.Text>
            </TextBox>
            <TextBlock Grid.Row="1" Grid.Column="1" x:Name="lWError" Text="{Binding  ElementName=tblabware_width,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
            
            <!--<TextBox Grid.Row="2" Grid.Column="2" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
                     BorderThickness="0" Text="{Binding labware_height, Mode=TwoWay}"/>-->
            <TextBox x:Name="tblabware_height" Grid.Row="2" Grid.Column="2" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
                     BorderThickness="0" >
                <TextBox.Text>
                    <Binding Path="labware_height" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
                        <Binding.ValidationRules>
                            <local:ConsumablesValidationRule  ValidateType="1,4@[2],5@[0-1000]"/>
                        </Binding.ValidationRules>
                    </Binding>
                </TextBox.Text>
            </TextBox>
            <TextBlock Grid.Row="1" Grid.Column="2" x:Name="lHError" Text="{Binding  ElementName=tblabware_height,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
 
            <TextBlock Grid.Row="3" Grid.Column="0" Text="{x:Static str:Resources.strConsumableWell}" VerticalAlignment="Center"
                               FontSize="16" Margin="20 0 0 0" FontWeight="Bold"/>
            <TextBlock Grid.Row="4" Grid.Column="0" Text="{x:Static str:Resources.strRowNum}" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
            <TextBlock Grid.Row="4" Grid.Column="1" Text="{x:Static str:Resources.strColumnNum}" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
            <TextBlock Grid.Row="4" Grid.Column="2" Text="{x:Static str:Resources.strWellNum}" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
            <!--<TextBox x:Name="textboxRows" Grid.Row="5" Grid.Column="0" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
                     BorderThickness="0" Text="{Binding number_row, Mode=TwoWay}" TextChanged="textboxRows_TextChanged"/>-->
            <TextBox x:Name="textboxRows" Grid.Row="5" Grid.Column="0" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
                     BorderThickness="0" PreviewTextInput="PreviewTextInput" LostFocus="textboxRows_LostFocus">
                <TextBox.Text>
                    <Binding Path="number_row" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
                        <Binding.ValidationRules>
                            <local:ConsumablesValidationRule  ValidateType="1,4@[2],5@[0-1000]"/>
                        </Binding.ValidationRules>
                    </Binding>
                </TextBox.Text>
            </TextBox>
            <TextBlock Grid.Row="4" Grid.Column="0" x:Name="tbRowsError" Text="{Binding  ElementName=textboxRows,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
 
            <!--<TextBox x:Name="textboxColumns" Grid.Row="5" Grid.Column="1" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
                     BorderThickness="0" Text="{Binding number_column, Mode=TwoWay}" TextChanged="textboxColumns_TextChanged"/>-->
            <TextBox x:Name="textboxColumns" Grid.Row="5" Grid.Column="1" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
                     BorderThickness="0"   LostFocus="textboxColumns_LostFocus">
                <TextBox.Text>
                    <Binding Path="number_column" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
                        <Binding.ValidationRules>
                            <local:ConsumablesValidationRule  ValidateType="1,4@[2],5@[0-1000]"/>
                        </Binding.ValidationRules>
                    </Binding>
                </TextBox.Text>
            </TextBox>
            <TextBlock Grid.Row="4" Grid.Column="1" x:Name="tbColumnError" Text="{Binding  ElementName=textboxColumns,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
 
            <TextBox x:Name="textboxWellCount" Grid.Row="5" Grid.Column="2" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
                     BorderThickness="0" Text=""/>
 
            <TextBlock Grid.Row="6" Grid.Column="0" Text="{x:Static str:Resources.strDistanceFrom2Well}" VerticalAlignment="Center"
                               FontSize="16" Margin="20 0 0 0" FontWeight="Bold"/>
            <TextBlock Grid.Row="7" Grid.Column="0" Text="X (mm)" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
            <TextBlock Grid.Row="7" Grid.Column="1" Text="Y (mm)" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
            <!--<TextBox Grid.Row="8" Grid.Column="0" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
                     BorderThickness="0" Text="{Binding a1_a2_distance, Mode=TwoWay}"/>-->
            <TextBox x:Name="tba1_a2_distance" Grid.Row="8" Grid.Column="0" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
                     BorderThickness="0" >
                <TextBox.Text>
                    <Binding Path="a1_a2_distance" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
                        <Binding.ValidationRules>
                            <local:ConsumablesValidationRule  ValidateType="1,4@[2],5@[0-1000]"/>
                        </Binding.ValidationRules>
                    </Binding>
                </TextBox.Text>
            </TextBox>
            <TextBlock Grid.Row="7" Grid.Column="0" x:Name="tba1a2Error" Text="{Binding  ElementName=tba1_a2_distance,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
 
            <!--<TextBox Grid.Row="8" Grid.Column="1" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
                     BorderThickness="0" Text="{Binding a1_b1_distance, Mode=TwoWay}"/>-->
            <TextBox x:Name="tba1_b1_distance" Grid.Row="8" Grid.Column="1" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
                     BorderThickness="0" >
                <TextBox.Text>
                    <Binding Path="a1_b1_distance" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
                        <Binding.ValidationRules>
                            <local:ConsumablesValidationRule  ValidateType="1,4@[2],5@[0-1000]"/>
                        </Binding.ValidationRules>
                    </Binding>
                </TextBox.Text>
            </TextBox>
            <TextBlock Grid.Row="7" Grid.Column="1" x:Name="tba1b1Error" Text="{Binding  ElementName=tba1_b1_distance,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
 
            <TextBlock Grid.Row="9" Grid.Column="0" Text="{x:Static str:Resources.strDistanceFromWll2Board}" VerticalAlignment="Center"
                               FontSize="16" Margin="20 0 0 0" FontWeight="Bold"/>
            <TextBlock Grid.Row="10" Grid.Column="0" Text="{x:Static str:Resources.strJuX}" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
            <TextBlock Grid.Row="10" Grid.Column="1" Text="{x:Static str:Resources.strJuY}" VerticalAlignment="Center" FontSize="16" Margin="20 0 0 0"/>
            <!--<TextBox Grid.Row="11" Grid.Column="0" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
                     BorderThickness="0" Text="{Binding a1_distance_x, Mode=TwoWay}"/>-->
            <TextBox x:Name="tba1_distance_x" Grid.Row="11" Grid.Column="0" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
                     BorderThickness="0" >
                <TextBox.Text>
                    <Binding Path="a1_distance_x" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
                        <Binding.ValidationRules>
                            <local:ConsumablesValidationRule  ValidateType="1,4@[2],5@[0-1000]"/>
                        </Binding.ValidationRules>
                    </Binding>
                </TextBox.Text>
            </TextBox>
            <TextBlock Grid.Row="10" Grid.Column="0" x:Name="tba1XError" Text="{Binding  ElementName=tba1_distance_x,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
            
            <!--<TextBox Grid.Row="11" Grid.Column="1" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
                     BorderThickness="0" Text="{Binding a1_distance_y, Mode=TwoWay}"/>-->
            <TextBox x:Name="tba1_distance_y" Grid.Row="11" Grid.Column="1" Height="30" FontSize="16" VerticalContentAlignment="Center" VerticalAlignment="Top" Background="{DynamicResource lightGrayBrush}" Margin="20 0"
                     BorderThickness="0" >
                <TextBox.Text>
                    <Binding Path="a1_distance_y" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged" NotifyOnValidationError="True" >
                        <Binding.ValidationRules>
                            <local:ConsumablesValidationRule  ValidateType="1,4@[2],5@[0-1000]"/>
                        </Binding.ValidationRules>
                    </Binding>
                </TextBox.Text>
            </TextBox>
            <TextBlock Grid.Row="10" Grid.Column="1" x:Name="tba1YError" Text="{Binding  ElementName=tba1_distance_y,Path=(Validation.Errors)[0].ErrorContent}" Foreground="Red" FontSize="16" 
                   VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5 5 5 0"/>
 
            <StackPanel Grid.Row="12" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal">
                <TextBlock Text="{x:Static str:Resources.strChooseAdaptTips}" VerticalAlignment="Center"
                               FontSize="16" Margin="20 0" FontWeight="Bold"/>
                <Button x:Name="btnTipLoadType" Content="{x:Static str:Resources.strSetting}" VerticalAlignment="Center" 
                            HorizontalAlignment="Right" Style="{DynamicResource LinkButton}" Foreground="Blue" FontSize="16" Click="btnTipLoadType_Click" />
            </StackPanel>
        </Grid>
    </Grid>
</UserControl>