Skip to content

Commit 37d7744

Browse files
committed
Update DNSLookupView.xaml
1 parent 027b11b commit 37d7744

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

Source/NETworkManager/Views/DNSLookupView.xaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,15 @@
7373
<ComboBox x:Name="ComboBoxDNSServers"
7474
Grid.Column="6" Grid.Row="0"
7575
ItemsSource="{Binding DNSServers}"
76-
SelectedItem="{Binding SelectedDNSServer}"
77-
Text="{Binding Path=DNSServer, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
78-
IsEditable="True"
79-
IsTextSearchEnabled="False">
76+
SelectedItem="{Binding SelectedDNSServer}"
77+
IsEditable="True">
78+
<ComboBox.Text>
79+
<Binding Path="DNSServer" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged">
80+
<Binding.ValidationRules>
81+
<validators:EmptyValidator ValidatesOnTargetUpdated="True" />
82+
</Binding.ValidationRules>
83+
</Binding>
84+
</ComboBox.Text>
8085
</ComboBox>
8186
<TextBlock Grid.Column="8" Grid.Row="0" Text="{x:Static localization:Strings.Type}"
8287
Style="{DynamicResource DefaultTextBlock}" VerticalAlignment="Center" />
@@ -93,7 +98,7 @@
9398
Value="True">
9499
<Setter Property="IsEnabled" Value="False" />
95100
</DataTrigger>
96-
<DataTrigger Binding="{Binding Path=(Validation.HasError), ElementName=ComboBoxTypes}"
101+
<DataTrigger Binding="{Binding Path=(Validation.HasError), ElementName=ComboBoxDNSServers}"
97102
Value="True">
98103
<Setter Property="IsEnabled" Value="False" />
99104
</DataTrigger>

0 commit comments

Comments
 (0)