|
| 1 | +<UserControl |
| 2 | + x:Class="InternetTest.Components.Sidebar" |
| 3 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 4 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 5 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 6 | + xmlns:lang="clr-namespace:InternetTest.Properties" |
| 7 | + xmlns:local="clr-namespace:InternetTest.Components" |
| 8 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 9 | + xmlns:sys="clr-namespace:System;assembly=mscorlib" |
| 10 | + d:DesignHeight="550" |
| 11 | + d:DesignWidth="300" |
| 12 | + FontFamily="..\Fonts\#Hauora" |
| 13 | + Foreground="{DynamicResource Foreground1}" |
| 14 | + mc:Ignorable="d"> |
| 15 | + <UserControl.Resources> |
| 16 | + <BooleanToVisibilityConverter x:Key="BoolToVis" /> |
| 17 | + </UserControl.Resources> |
| 18 | + <Border |
| 19 | + Margin="10" |
| 20 | + Padding="10" |
| 21 | + Background="{DynamicResource SidebarBackground}" |
| 22 | + BorderBrush="{DynamicResource Border}" |
| 23 | + BorderThickness="1" |
| 24 | + CornerRadius="6"> |
| 25 | + <Grid> |
| 26 | + <Grid.RowDefinitions> |
| 27 | + <RowDefinition Height="Auto" /> |
| 28 | + <RowDefinition Height="Auto" /> |
| 29 | + <RowDefinition Height="Auto" /> |
| 30 | + <RowDefinition Height="*" /> |
| 31 | + <RowDefinition Height="Auto" /> |
| 32 | + </Grid.RowDefinitions> |
| 33 | + <RadioButton |
| 34 | + Padding="5" |
| 35 | + HorizontalContentAlignment="Stretch" |
| 36 | + Background="Transparent" |
| 37 | + GroupName="Sidebar" |
| 38 | + Style="{DynamicResource SidebarButton}"> |
| 39 | + <Grid> |
| 40 | + <Grid.ColumnDefinitions> |
| 41 | + <ColumnDefinition Width="Auto" /> |
| 42 | + <ColumnDefinition /> |
| 43 | + </Grid.ColumnDefinitions> |
| 44 | + <Border |
| 45 | + Width="40" |
| 46 | + Height="40" |
| 47 | + Margin="5" |
| 48 | + Padding="5" |
| 49 | + Background="{DynamicResource Accent}" |
| 50 | + CornerRadius="10"> |
| 51 | + <TextBlock |
| 52 | + HorizontalAlignment="Center" |
| 53 | + VerticalAlignment="Center" |
| 54 | + FontFamily="..\Fonts\#FluentSystemIcons-Filled" |
| 55 | + FontSize="20" |
| 56 | + Foreground="{DynamicResource WindowButtonsHoverForeground1}" |
| 57 | + Text="" /> |
| 58 | + </Border> |
| 59 | + <StackPanel |
| 60 | + Grid.Column="1" |
| 61 | + Margin="10 0 0 0" |
| 62 | + VerticalAlignment="Center"> |
| 63 | + <TextBlock |
| 64 | + FontSize="16" |
| 65 | + FontWeight="Bold" |
| 66 | + Text="{x:Static lang:Resources.InternetTest}" /> |
| 67 | + <TextBlock Text="{x:Static lang:Resources.Home}" /> |
| 68 | + </StackPanel> |
| 69 | + </Grid> |
| 70 | + </RadioButton> |
| 71 | + <TextBlock |
| 72 | + Grid.Row="1" |
| 73 | + Margin="0 10" |
| 74 | + FontWeight="SemiBold" |
| 75 | + Foreground="{DynamicResource Foreground2}" |
| 76 | + Text="{x:Static lang:Resources.Tools}" /> |
| 77 | + |
| 78 | + <StackPanel Grid.Row="2"> |
| 79 | + <ToggleButton |
| 80 | + x:Name="WebUtilsBtn" |
| 81 | + Padding="5" |
| 82 | + HorizontalContentAlignment="Left" |
| 83 | + Background="Transparent" |
| 84 | + Style="{DynamicResource SidebarChevronButton}"> |
| 85 | + <StackPanel Orientation="Horizontal"> |
| 86 | + <TextBlock |
| 87 | + VerticalAlignment="Center" |
| 88 | + FontFamily="..\Fonts\#FluentSystemIcons-Regular" |
| 89 | + FontSize="16" |
| 90 | + Text="" /> |
| 91 | + <TextBlock |
| 92 | + Grid.Column="1" |
| 93 | + Margin="10 0 0 0" |
| 94 | + VerticalAlignment="Center" |
| 95 | + FontWeight="SemiBold" |
| 96 | + Text="{x:Static lang:Resources.WebUtilities}" /> |
| 97 | + |
| 98 | + </StackPanel> |
| 99 | + </ToggleButton> |
| 100 | + <Grid Visibility="{Binding IsChecked, ElementName=WebUtilsBtn, Converter={StaticResource BoolToVis}}"> |
| 101 | + <Grid.ColumnDefinitions> |
| 102 | + <ColumnDefinition Width="Auto" /> |
| 103 | + <ColumnDefinition /> |
| 104 | + </Grid.ColumnDefinitions> |
| 105 | + <Rectangle |
| 106 | + Width="1" |
| 107 | + Margin="13 0 12 0" |
| 108 | + Fill="{DynamicResource Border}" |
| 109 | + RadiusX="1" |
| 110 | + RadiusY="1" /> |
| 111 | + <StackPanel Grid.Column="1"> |
| 112 | + <RadioButton |
| 113 | + Grid.Row="4" |
| 114 | + Padding="5" |
| 115 | + HorizontalContentAlignment="Left" |
| 116 | + Background="Transparent" |
| 117 | + Content="{x:Static lang:Resources.DownDetector}" |
| 118 | + GroupName="Sidebar" |
| 119 | + Style="{DynamicResource SidebarButton}" /> |
| 120 | + <RadioButton |
| 121 | + Grid.Row="4" |
| 122 | + Padding="5" |
| 123 | + HorizontalContentAlignment="Left" |
| 124 | + Background="Transparent" |
| 125 | + Content="{x:Static lang:Resources.DNSTool}" |
| 126 | + GroupName="Sidebar" |
| 127 | + Style="{DynamicResource SidebarButton}" /> |
| 128 | + <RadioButton |
| 129 | + Grid.Row="4" |
| 130 | + Padding="5" |
| 131 | + HorizontalContentAlignment="Left" |
| 132 | + Background="Transparent" |
| 133 | + Content="{x:Static lang:Resources.WiFi}" |
| 134 | + GroupName="Sidebar" |
| 135 | + Style="{DynamicResource SidebarButton}" /> |
| 136 | + </StackPanel> |
| 137 | + </Grid> |
| 138 | + <ToggleButton |
| 139 | + x:Name="IpBtn" |
| 140 | + Padding="5" |
| 141 | + HorizontalContentAlignment="Left" |
| 142 | + Background="Transparent" |
| 143 | + Style="{DynamicResource SidebarChevronButton}"> |
| 144 | + <StackPanel Orientation="Horizontal"> |
| 145 | + <TextBlock |
| 146 | + VerticalAlignment="Center" |
| 147 | + FontFamily="..\Fonts\#FluentSystemIcons-Regular" |
| 148 | + FontSize="16" |
| 149 | + Text="" /> |
| 150 | + <TextBlock |
| 151 | + Grid.Column="1" |
| 152 | + Margin="10 0 0 0" |
| 153 | + VerticalAlignment="Center" |
| 154 | + FontWeight="SemiBold" |
| 155 | + Text="{x:Static lang:Resources.IPTools}" /> |
| 156 | + |
| 157 | + </StackPanel> |
| 158 | + </ToggleButton> |
| 159 | + <Grid Visibility="{Binding IsChecked, ElementName=IpBtn, Converter={StaticResource BoolToVis}}"> |
| 160 | + <Grid.ColumnDefinitions> |
| 161 | + <ColumnDefinition Width="Auto" /> |
| 162 | + <ColumnDefinition /> |
| 163 | + </Grid.ColumnDefinitions> |
| 164 | + <Rectangle |
| 165 | + Width="1" |
| 166 | + Margin="13 0 12 0" |
| 167 | + Fill="{DynamicResource Border}" |
| 168 | + RadiusX="1" |
| 169 | + RadiusY="1" /> |
| 170 | + <StackPanel Grid.Column="1"> |
| 171 | + <RadioButton |
| 172 | + Grid.Row="4" |
| 173 | + Padding="5" |
| 174 | + HorizontalContentAlignment="Left" |
| 175 | + Background="Transparent" |
| 176 | + Content="{x:Static lang:Resources.LocateIP}" |
| 177 | + GroupName="Sidebar" |
| 178 | + Style="{DynamicResource SidebarButton}" /> |
| 179 | + <RadioButton |
| 180 | + Grid.Row="4" |
| 181 | + Padding="5" |
| 182 | + HorizontalContentAlignment="Left" |
| 183 | + Background="Transparent" |
| 184 | + Content="{x:Static lang:Resources.IPConfig}" |
| 185 | + GroupName="Sidebar" |
| 186 | + Style="{DynamicResource SidebarButton}" /> |
| 187 | + </StackPanel> |
| 188 | + </Grid> |
| 189 | + <ToggleButton |
| 190 | + x:Name="CommandBtn" |
| 191 | + Padding="5" |
| 192 | + HorizontalContentAlignment="Left" |
| 193 | + Background="Transparent" |
| 194 | + Style="{DynamicResource SidebarChevronButton}"> |
| 195 | + <StackPanel Orientation="Horizontal"> |
| 196 | + <TextBlock |
| 197 | + VerticalAlignment="Center" |
| 198 | + FontFamily="..\Fonts\#FluentSystemIcons-Regular" |
| 199 | + FontSize="16" |
| 200 | + Text="" /> |
| 201 | + <TextBlock |
| 202 | + Grid.Column="1" |
| 203 | + Margin="10 0 0 0" |
| 204 | + VerticalAlignment="Center" |
| 205 | + FontWeight="SemiBold" |
| 206 | + Text="{x:Static lang:Resources.Commands}" /> |
| 207 | + |
| 208 | + </StackPanel> |
| 209 | + </ToggleButton> |
| 210 | + <Grid Visibility="{Binding IsChecked, ElementName=CommandBtn, Converter={StaticResource BoolToVis}}"> |
| 211 | + <Grid.ColumnDefinitions> |
| 212 | + <ColumnDefinition Width="Auto" /> |
| 213 | + <ColumnDefinition /> |
| 214 | + </Grid.ColumnDefinitions> |
| 215 | + <Rectangle |
| 216 | + Width="1" |
| 217 | + Margin="13 0 12 0" |
| 218 | + Fill="{DynamicResource Border}" |
| 219 | + RadiusX="1" |
| 220 | + RadiusY="1" /> |
| 221 | + <StackPanel Grid.Column="1"> |
| 222 | + <RadioButton |
| 223 | + Grid.Row="4" |
| 224 | + Padding="5" |
| 225 | + HorizontalContentAlignment="Left" |
| 226 | + Background="Transparent" |
| 227 | + Content="{x:Static lang:Resources.Ping}" |
| 228 | + GroupName="Sidebar" |
| 229 | + Style="{DynamicResource SidebarButton}" /> |
| 230 | + <RadioButton |
| 231 | + Grid.Row="4" |
| 232 | + Padding="5" |
| 233 | + HorizontalContentAlignment="Left" |
| 234 | + Background="Transparent" |
| 235 | + Content="{x:Static lang:Resources.Requests}" |
| 236 | + GroupName="Sidebar" |
| 237 | + Style="{DynamicResource SidebarButton}" /> |
| 238 | + <RadioButton |
| 239 | + Grid.Row="4" |
| 240 | + Padding="5" |
| 241 | + HorizontalContentAlignment="Left" |
| 242 | + Background="Transparent" |
| 243 | + Content="{x:Static lang:Resources.TraceRoute}" |
| 244 | + GroupName="Sidebar" |
| 245 | + Style="{DynamicResource SidebarButton}" /> |
| 246 | + </StackPanel> |
| 247 | + </Grid> |
| 248 | + </StackPanel> |
| 249 | + |
| 250 | + <RadioButton |
| 251 | + Grid.Row="4" |
| 252 | + Padding="5" |
| 253 | + HorizontalContentAlignment="Left" |
| 254 | + Background="Transparent" |
| 255 | + GroupName="Sidebar" |
| 256 | + Style="{DynamicResource SidebarButton}"> |
| 257 | + <StackPanel Orientation="Horizontal"> |
| 258 | + <TextBlock |
| 259 | + VerticalAlignment="Center" |
| 260 | + FontFamily="..\Fonts\#FluentSystemIcons-Regular" |
| 261 | + FontSize="16" |
| 262 | + Text="" /> |
| 263 | + <TextBlock |
| 264 | + Margin="10 0 0 0" |
| 265 | + VerticalAlignment="Center" |
| 266 | + FontWeight="SemiBold" |
| 267 | + Text="{x:Static lang:Resources.Settings}" /> |
| 268 | + </StackPanel> |
| 269 | + </RadioButton> |
| 270 | + </Grid> |
| 271 | + </Border> |
| 272 | +</UserControl> |
0 commit comments