|
26 | 26 | <Grid.RowDefinitions> |
27 | 27 | <RowDefinition Height="Auto" /> |
28 | 28 | <RowDefinition Height="Auto" /> |
| 29 | + <RowDefinition Height="Auto" /> |
29 | 30 | </Grid.RowDefinitions> |
30 | 31 | <Grid Grid.Row="0"> |
31 | 32 | <Grid.ColumnDefinitions> |
32 | 33 | <ColumnDefinition Width="*" /> |
33 | 34 | <ColumnDefinition Width="Auto" /> |
34 | 35 | </Grid.ColumnDefinitions> |
35 | | - <ComboBox Grid.Column="0" x:Name="txtHostnameOrIPAddress" ItemsSource="{Binding HostnameOrIPAddressHistory}" mah:TextBoxHelper.Watermark="{DynamicResource String_Watermark_HostnameOrIPAddress}" Validation.ErrorTemplate="{StaticResource DefaultErrorTemplate}" IsEnabled="{Binding IsPingRunning, Converter={StaticResource BooleanReverseConverter}}" Style="{StaticResource HistoryComboBox}"> |
| 36 | + <ComboBox Grid.Column="0" x:Name="txtHostnameOrIPAddress" ItemsSource="{Binding HostnameOrIPAddressHistory}" mah:TextBoxHelper.Watermark="{DynamicResource String_Watermark_HostnameOrIPAddress}" Validation.ErrorTemplate="{StaticResource DefaultErrorTemplate}" IsEnabled="{Binding IsLookupRunning, Converter={StaticResource BooleanReverseConverter}}" Style="{StaticResource HistoryComboBox}"> |
36 | 37 | <ComboBox.Text> |
37 | 38 | <Binding Path="HostnameOrIPAddress" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged"> |
38 | 39 | <Binding.ValidationRules> |
|
41 | 42 | </Binding> |
42 | 43 | </ComboBox.Text> |
43 | 44 | </ComboBox> |
44 | | - <Button Grid.Column="1" Command="{Binding LookupCommand}" IsDefault="{Binding IsLookupRunning, Converter={StaticResource BooleanReverseConverter}}" IsCancel="{Binding IsLookupRunning}" HorizontalAlignment="Right" Margin="10,0,0,0"> |
| 45 | + <Button Grid.Column="1" Command="{Binding LookupCommand}" IsDefault="{Binding IsLookupRunning, Converter={StaticResource BooleanReverseConverter}}" HorizontalAlignment="Right" Margin="10,0,0,0"> |
45 | 46 | <Button.Resources> |
46 | 47 | <Style TargetType="{x:Type Button}" BasedOn="{StaticResource ImageWithTextButton}"> |
47 | 48 | <Setter Property="IsEnabled" Value="True" /> |
48 | 49 | <Style.Triggers> |
49 | 50 | <DataTrigger Binding="{Binding Path=(Validation.HasError), ElementName=txtHostnameOrIPAddress}" Value="True" > |
50 | 51 | <Setter Property="IsEnabled" Value="False" /> |
51 | 52 | </DataTrigger> |
52 | | - <DataTrigger Binding="{Binding CancelPing}" Value="True"> |
| 53 | + <DataTrigger Binding="{Binding IsLookupRunning}" Value="True"> |
53 | 54 | <Setter Property="IsEnabled" Value="False" /> |
54 | 55 | </DataTrigger> |
55 | 56 | </Style.Triggers> |
|
70 | 71 | <Style TargetType="{x:Type Rectangle}"> |
71 | 72 | <Setter Property="OpacityMask" Value="{StaticResource VisualControlPlay}" /> |
72 | 73 | <Setter Property="Fill" Value="{DynamicResource GrayBrush3}" /> |
73 | | - <Style.Triggers> |
74 | | - <DataTrigger Binding="{Binding IsLookupRunning}" Value="True"> |
75 | | - <Setter Property="OpacityMask" Value="{StaticResource VisualClose}" /> |
76 | | - </DataTrigger> |
77 | | - </Style.Triggers> |
78 | 74 | </Style> |
79 | 75 | </Rectangle.Style> |
80 | 76 | </Rectangle> |
81 | | - <TextBlock Grid.Column="1" FontSize="14" Margin="10,5" TextAlignment="Center"> |
82 | | - <TextBlock.Style> |
83 | | - <Style TargetType="{x:Type TextBlock}"> |
84 | | - <Setter Property="Text" Value="{DynamicResource String_Button_Lookup}"/> |
85 | | - <Style.Triggers> |
86 | | - <DataTrigger Binding="{Binding IsLookupRunning}" Value="True" > |
87 | | - <Setter Property="Text" Value="{DynamicResource String_Button_Cancel}"/> |
88 | | - </DataTrigger> |
89 | | - </Style.Triggers> |
90 | | - </Style> |
91 | | - </TextBlock.Style> |
92 | | - </TextBlock> |
| 77 | + <TextBlock Grid.Column="1" FontSize="14" Text="{DynamicResource String_Button_Lookup}" Margin="10,5" TextAlignment="Center" /> |
93 | 78 | </Grid> |
94 | 79 | </Button.Content> |
95 | 80 | </Button> |
|
105 | 90 | </Style> |
106 | 91 | </Controls:MetroProgressBar.Style> |
107 | 92 | </Controls:MetroProgressBar> |
| 93 | + <TextBlock Grid.Row="2" Foreground="{DynamicResource AccentColorBrush}" Text="{Binding ErrorMessage}" Visibility="{Binding DisplayErrorMessage, Converter={StaticResource BooleanToVisibilityConverter}}" Style="{DynamicResource DefaultTextBlock}" Margin="0,10,0,0" /> |
108 | 94 | </Grid> |
109 | 95 | <TextBlock Grid.Row="2" Text="{DynamicResource String_Header_Result}" Style="{StaticResource HeaderTextBlock}" /> |
110 | 96 | <Control:ScrollingDataGrid Grid.Row="3" CanUserSortColumns="False" CanUserReorderColumns="False" Style="{StaticResource MetroDataGrid}" FontSize="14" mah:ControlsHelper.ContentCharacterCasing="Normal" ItemsSource="{Binding LookupResult}" CanUserAddRows="False" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" AutoGenerateColumns="False" IsReadOnly="True"> |
|
0 commit comments