|
| 1 | +<mahAppsControls:MetroWindow x:Class="NETworkManager.StatusWindow" |
| 2 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 3 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 4 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 5 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 6 | + xmlns:mahAppsControls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro" |
| 7 | + xmlns:localization="clr-namespace:NETworkManager.Resources.Localization" |
| 8 | + xmlns:networkManager="clr-namespace:NETworkManager" |
| 9 | + xmlns:converters="clr-namespace:NETworkManager.Converters" |
| 10 | + mc:Ignorable="d" d:DataContext="{d:DesignInstance networkManager:StatusWindow}" |
| 11 | + Title="{x:Static localization:StaticStrings.ProductName}" Height="350" Width="250" IsWindowDraggable="False" GotKeyboardFocus="MetroWindow_GotKeyboardFocus" LostKeyboardFocus="MetroWindow_LostKeyboardFocus" Style="{StaticResource DefaultWindow}" ShowMinButton="False" ShowMaxRestoreButton="False" ShowCloseButton="False"> |
| 12 | + <mahAppsControls:MetroWindow.Resources> |
| 13 | + <converters:Bytes1000ToSpeedConverter x:Key="Bytes1000ToSpeedConverter" /> |
| 14 | + <converters:IPAddressArrayToStringConverter x:Key="IPAddressArrayToStringConverter" /> |
| 15 | + </mahAppsControls:MetroWindow.Resources> |
| 16 | + <Grid Margin="10"> |
| 17 | + <StackPanel> |
| 18 | + <TextBlock Text="{x:Static localization:Strings.Network}" Style="{StaticResource HeaderTextBlock}" /> |
| 19 | + <Grid> |
| 20 | + <Grid.Resources> |
| 21 | + <Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource CenterTextBlock}" /> |
| 22 | + <Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource TextBlockAsTextBox}"> |
| 23 | + <Setter Property="ContextMenu" Value="{StaticResource CopyContextMenu}" /> |
| 24 | + <Setter Property="TextWrapping" Value="NoWrap" /> |
| 25 | + </Style> |
| 26 | + </Grid.Resources> |
| 27 | + <Grid.ColumnDefinitions> |
| 28 | + <ColumnDefinition Width="Auto" /> |
| 29 | + <ColumnDefinition Width="10" /> |
| 30 | + <ColumnDefinition Width="*" /> |
| 31 | + </Grid.ColumnDefinitions> |
| 32 | + <Grid.RowDefinitions> |
| 33 | + <RowDefinition Height="Auto" /> |
| 34 | + <RowDefinition Height="Auto" /> |
| 35 | + <RowDefinition Height="Auto" /> |
| 36 | + <RowDefinition Height="Auto" /> |
| 37 | + </Grid.RowDefinitions> |
| 38 | + <TextBlock Grid.Column="0" Grid.Row="0" Text="{x:Static localization:Strings.IPAddress}" /> |
| 39 | + <TextBox Grid.Column="2" Grid.Row="0" Text="{Binding NetworkInterfaceInfo.IPv4Address, Converter={StaticResource IPAddressArrayToStringConverter}}" /> |
| 40 | + <TextBlock Grid.Column="0" Grid.Row="1" Text="{x:Static localization:Strings.Subnetmask}" /> |
| 41 | + <TextBox Grid.Column="2" Grid.Row="1" Text="{Binding NetworkInterfaceInfo.Subnetmask, Converter={StaticResource IPAddressArrayToStringConverter}}" /> |
| 42 | + <TextBlock Grid.Column="0" Grid.Row="2" Text="{x:Static localization:Strings.Gateway}" /> |
| 43 | + <TextBox Grid.Column="2" Grid.Row="2" Text="{Binding NetworkInterfaceInfo.IPv4Gateway, Converter={StaticResource IPAddressArrayToStringConverter}}" /> |
| 44 | + <TextBlock Grid.Column="0" Grid.Row="3" Text="{x:Static localization:Strings.Speed}" /> |
| 45 | + <TextBox Grid.Column="2" Grid.Row="3" Text="{Binding NetworkInterfaceInfo.Speed, Converter={StaticResource Bytes1000ToSpeedConverter}}" /> |
| 46 | + </Grid> |
| 47 | + </StackPanel> |
| 48 | + </Grid> |
| 49 | +</mahAppsControls:MetroWindow> |
0 commit comments