|
32 | 32 | <RowDefinition Height="Auto" /> |
33 | 33 | <RowDefinition Height="Auto" /> |
34 | 34 | </Grid.RowDefinitions> |
35 | | - <Grid Grid.Row="0" Margin="0,0,0,10"> |
36 | | - <Grid.ColumnDefinitions> |
37 | | - <ColumnDefinition Width="Auto" /> |
38 | | - <ColumnDefinition Width="10" /> |
39 | | - <ColumnDefinition Width="*" /> |
40 | | - <ColumnDefinition Width="10" /> |
41 | | - <ColumnDefinition Width="Auto" /> |
42 | | - </Grid.ColumnDefinitions> |
43 | | - <Grid.RowDefinitions> |
44 | | - <RowDefinition Height="Auto" /> |
45 | | - <RowDefinition Height="10" /> |
46 | | - <RowDefinition Height="Auto" /> |
47 | | - </Grid.RowDefinitions> |
48 | | - <TextBlock Grid.Column="0" Grid.Row="0" Text="{DynamicResource String_Host}" Style="{DynamicResource DefaultTextBlock}" VerticalAlignment="Center" /> |
49 | | - <ComboBox x:Name="cbHost" Grid.Column="2" Grid.Row="0" Height="{Binding ElementName=cbType, Path=ActualHeight}" ItemsSource="{Binding HostHistoryView}" mah:TextBoxHelper.Watermark="{DynamicResource String_Watermark_ExampleHostnameOrIPAddress}" IsEnabled="{Binding IsLookupRunning, Converter={StaticResource BooleanReverseConverter}}" Style="{StaticResource HistoryComboBox}"> |
50 | | - <ComboBox.Text> |
51 | | - <Binding Path="Host" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged"> |
52 | | - <Binding.ValidationRules> |
53 | | - <Validator:EmptyValidator ValidatesOnTargetUpdated="True" /> |
54 | | - </Binding.ValidationRules> |
55 | | - </Binding> |
56 | | - </ComboBox.Text> |
57 | | - </ComboBox> |
58 | | - <TextBlock Grid.Column="0" Grid.Row="2" Text="{DynamicResource String_Type}" Style="{DynamicResource DefaultTextBlock}" VerticalAlignment="Center" /> |
59 | | - <ComboBox x:Name="cbType" Grid.Column="2" Grid.Row="2" ItemsSource="{Binding Types}" SelectedItem="{Binding Type}" Width="200" HorizontalAlignment="Left" /> |
| 35 | + <Grid Grid.Row="0" Margin="0,0,0,10"> |
| 36 | + <Grid.ColumnDefinitions> |
| 37 | + <ColumnDefinition Width="Auto" /> |
| 38 | + <ColumnDefinition Width="10" /> |
| 39 | + <ColumnDefinition Width="*" /> |
| 40 | + <ColumnDefinition Width="10" /> |
| 41 | + <ColumnDefinition Width="Auto" /> |
| 42 | + </Grid.ColumnDefinitions> |
| 43 | + <Grid.RowDefinitions> |
| 44 | + <RowDefinition Height="Auto" /> |
| 45 | + <RowDefinition Height="10" /> |
| 46 | + <RowDefinition Height="Auto" /> |
| 47 | + </Grid.RowDefinitions> |
| 48 | + <TextBlock Grid.Column="0" Grid.Row="0" Text="{DynamicResource String_Host}" Style="{DynamicResource DefaultTextBlock}" VerticalAlignment="Center" /> |
| 49 | + <ComboBox x:Name="cbHost" Grid.Column="2" Grid.Row="0" Height="{Binding ElementName=cbType, Path=ActualHeight}" ItemsSource="{Binding HostHistoryView}" mah:TextBoxHelper.Watermark="{DynamicResource String_Watermark_ExampleHostnameOrIPAddress}" IsEnabled="{Binding IsLookupRunning, Converter={StaticResource BooleanReverseConverter}}" Style="{StaticResource HistoryComboBox}"> |
| 50 | + <ComboBox.Text> |
| 51 | + <Binding Path="Host" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged"> |
| 52 | + <Binding.ValidationRules> |
| 53 | + <Validator:EmptyValidator ValidatesOnTargetUpdated="True" /> |
| 54 | + </Binding.ValidationRules> |
| 55 | + </Binding> |
| 56 | + </ComboBox.Text> |
| 57 | + </ComboBox> |
| 58 | + <TextBlock Grid.Column="0" Grid.Row="2" Text="{DynamicResource String_Type}" Style="{DynamicResource DefaultTextBlock}" VerticalAlignment="Center" /> |
| 59 | + <ComboBox x:Name="cbType" Grid.Column="2" Grid.Row="2" ItemsSource="{Binding Types}" SelectedItem="{Binding Type}" Width="200" HorizontalAlignment="Left" /> |
60 | 60 | <Button Grid.Column="4" Grid.Row="2" Command="{Binding LookupCommand}" IsDefault="{Binding IsLookupRunning, Converter={StaticResource BooleanReverseConverter}}" HorizontalAlignment="Right"> |
61 | 61 | <Button.Resources> |
62 | 62 | <Style TargetType="{x:Type Button}" BasedOn="{StaticResource ImageWithTextButton}"> |
|
165 | 165 | </Rectangle> |
166 | 166 | </MenuItem.Icon> |
167 | 167 | </MenuItem> |
| 168 | + <MenuItem Header="{DynamicResource String_DNSServer}" Command="{Binding CopySelectedDNSServerCommand}"> |
| 169 | + <MenuItem.Icon> |
| 170 | + <Rectangle Width="16" Height="16" Fill="{DynamicResource BlackColorBrush}"> |
| 171 | + <Rectangle.OpacityMask> |
| 172 | + <VisualBrush Stretch="Uniform" Visual="{IconPacks:Material Kind=ContentCopy}" /> |
| 173 | + </Rectangle.OpacityMask> |
| 174 | + </Rectangle> |
| 175 | + </MenuItem.Icon> |
| 176 | + </MenuItem> |
| 177 | + <MenuItem Header="{DynamicResource String_Port}" Command="{Binding CopySelectedPortCommand}"> |
| 178 | + <MenuItem.Icon> |
| 179 | + <Rectangle Width="16" Height="16" Fill="{DynamicResource BlackColorBrush}"> |
| 180 | + <Rectangle.OpacityMask> |
| 181 | + <VisualBrush Stretch="Uniform" Visual="{IconPacks:Material Kind=ContentCopy}" /> |
| 182 | + </Rectangle.OpacityMask> |
| 183 | + </Rectangle> |
| 184 | + </MenuItem.Icon> |
| 185 | + </MenuItem> |
168 | 186 | </MenuItem> |
169 | 187 | </ContextMenu> |
170 | 188 | </DataGrid.Resources> |
|
177 | 195 | </Style.Triggers> |
178 | 196 | </Style> |
179 | 197 | </DataGrid.RowStyle> |
| 198 | + <DataGrid.GroupStyle> |
| 199 | + <GroupStyle> |
| 200 | + <GroupStyle.HeaderTemplate> |
| 201 | + <DataTemplate> |
| 202 | + <StackPanel> |
| 203 | + <TextBlock Text="{Binding Path=Name}" /> |
| 204 | + </StackPanel> |
| 205 | + </DataTemplate> |
| 206 | + </GroupStyle.HeaderTemplate> |
| 207 | + <GroupStyle.ContainerStyle> |
| 208 | + <Style TargetType="{x:Type GroupItem}"> |
| 209 | + <Setter Property="Template"> |
| 210 | + <Setter.Value> |
| 211 | + <ControlTemplate TargetType="{x:Type GroupItem}"> |
| 212 | + <Expander IsExpanded="True"> |
| 213 | + <Expander.Header> |
| 214 | + <StackPanel Orientation="Horizontal"> |
| 215 | + <TextBlock Text="{Binding Path=Name}" /> |
| 216 | + </StackPanel> |
| 217 | + </Expander.Header> |
| 218 | + <ItemsPresenter /> |
| 219 | + </Expander> |
| 220 | + </ControlTemplate> |
| 221 | + </Setter.Value> |
| 222 | + </Setter> |
| 223 | + </Style> |
| 224 | + </GroupStyle.ContainerStyle> |
| 225 | + </GroupStyle> |
| 226 | + </DataGrid.GroupStyle> |
180 | 227 | <DataGrid.Columns> |
181 | 228 | <DataGridTextColumn Header="{DynamicResource String_Name}" Binding="{Binding Name}" MinWidth="150" /> |
182 | 229 | <DataGridTextColumn Header="{DynamicResource String_TTL}" Binding="{Binding TTL}" MinWidth="80" /> |
|
0 commit comments