|
10 | 10 | xmlns:settings="clr-namespace:NETworkManager.Settings;assembly=NETworkManager.Settings" |
11 | 11 | xmlns:viewModels="clr-namespace:NETworkManager.ViewModels" |
12 | 12 | xmlns:system="clr-namespace:System;assembly=mscorlib" |
| 13 | + xmlns:wpfHelpers="clr-namespace:NETworkManager.Utilities.WPF;assembly=NETworkManager.Utilities.WPF" |
13 | 14 | mc:Ignorable="d" MinHeight="200" |
14 | 15 | d:DataContext="{d:DesignInstance viewModels:IPApiDNSResolverWidgetViewModel}"> |
15 | 16 | <UserControl.InputBindings> |
16 | | - <KeyBinding Key="F5" Command="{Binding CheckViaHotkeyCommand}" /> |
| 17 | + <KeyBinding Key="F5" Command="{Binding CheckCommand}" /> |
17 | 18 | </UserControl.InputBindings> |
18 | 19 | <UserControl.Resources> |
19 | 20 | <converters:BooleanReverseToVisibilityCollapsedConverter x:Key="BooleanReverseToVisibilityCollapsedConverter" /> |
|
37 | 38 | <RowDefinition Height="Auto" /> |
38 | 39 | <RowDefinition Height="*" /> |
39 | 40 | </Grid.RowDefinitions> |
40 | | - <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Left" Margin="10"> |
41 | | - <Rectangle Width="32" Height="32" Fill="{DynamicResource MahApps.Brushes.Gray3}"> |
42 | | - <Rectangle.OpacityMask> |
43 | | - <VisualBrush Stretch="Uniform" Visual="{iconPacks:Material Kind=SearchWeb}" /> |
44 | | - </Rectangle.OpacityMask> |
45 | | - </Rectangle> |
46 | | - <TextBlock Text="{x:Static localization:Strings.DNSResolver}" |
47 | | - Style="{StaticResource MessageTextBlock}" Margin="10,0,0,0" /> |
48 | | - </StackPanel> |
| 41 | + <Grid Grid.Row="0" Margin="10"> |
| 42 | + <Grid.ColumnDefinitions> |
| 43 | + <ColumnDefinition Width="Auto" /> |
| 44 | + <ColumnDefinition Width="*" /> |
| 45 | + <ColumnDefinition Width="Auto" /> |
| 46 | + </Grid.ColumnDefinitions> |
| 47 | + <StackPanel Grid.Column="0" Orientation="Horizontal" VerticalAlignment="Center"> |
| 48 | + <Rectangle Width="32" Height="32" Fill="{DynamicResource MahApps.Brushes.Gray3}"> |
| 49 | + <Rectangle.OpacityMask> |
| 50 | + <VisualBrush Stretch="Uniform" Visual="{iconPacks:Material Kind=SearchWeb}" /> |
| 51 | + </Rectangle.OpacityMask> |
| 52 | + </Rectangle> |
| 53 | + <TextBlock Text="{x:Static localization:Strings.DNSResolver}" |
| 54 | + Style="{StaticResource MessageTextBlock}" Margin="10,0,0,0" /> |
| 55 | + </StackPanel> |
| 56 | + <Button Grid.Column="2" Command="{Binding CheckCommand}" |
| 57 | + Style="{StaticResource CleanButton}" |
| 58 | + ToolTip="{x:Static localization:Strings.Refresh}" |
| 59 | + VerticalAlignment="Center"> |
| 60 | + <Rectangle Width="20" Height="20" |
| 61 | + wpfHelpers:ReloadAnimationHelper.IsReloading="{Binding IsRunning}"> |
| 62 | + <Rectangle.OpacityMask> |
| 63 | + <VisualBrush Stretch="Uniform" Visual="{iconPacks:Material Kind=Refresh}" /> |
| 64 | + </Rectangle.OpacityMask> |
| 65 | + <Rectangle.Style> |
| 66 | + <Style TargetType="{x:Type Rectangle}"> |
| 67 | + <Setter Property="Fill" Value="{DynamicResource MahApps.Brushes.Gray3}" /> |
| 68 | + <Style.Triggers> |
| 69 | + <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Button}}, Path=IsMouseOver}" Value="True"> |
| 70 | + <Setter Property="Fill" Value="{DynamicResource MahApps.Brushes.Gray5}" /> |
| 71 | + </DataTrigger> |
| 72 | + </Style.Triggers> |
| 73 | + </Style> |
| 74 | + </Rectangle.Style> |
| 75 | + </Rectangle> |
| 76 | + </Button> |
| 77 | + </Grid> |
49 | 78 | <Grid Grid.Column="0" Grid.Row="2" Margin="10" |
50 | 79 | Visibility="{Binding Source={x:Static Member=settings:SettingsManager.Current}, Path=Dashboard_CheckIPApiDNSResolver, Converter={StaticResource ResourceKey=BooleanToVisibilityCollapsedConverter}}"> |
51 | 80 | <!-- Result--> |
|
0 commit comments