Skip to content

Commit 46be0a3

Browse files
committed
UI improved
1 parent 3e9ac3b commit 46be0a3

2 files changed

Lines changed: 24 additions & 16 deletions

File tree

‎Source/NETworkManager/Resources/Styles/ExpanderStyles.xaml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@
7979
<ColumnDefinition Width="*" />
8080
<ColumnDefinition Width="Auto" />
8181
</Grid.ColumnDefinitions>
82-
<TextBlock Grid.Column="0" Text="{TemplateBinding Content}" Style="{StaticResource HeaderTextBlock}" Margin="0" />
83-
<Rectangle Grid.Column="1" x:Name="Chevron" Width="16" Height="16" Fill="{DynamicResource GrayBrush3}" Margin="0,0,6.5,0" VerticalAlignment="Center">
82+
<TextBlock Grid.Column="0" Text="{TemplateBinding Content}" Style="{StaticResource HeaderTextBlock}" Margin="10,10,10,0" />
83+
<Rectangle Grid.Column="1" x:Name="Chevron" Width="16" Height="16" Fill="{DynamicResource GrayBrush3}" Margin="0,10,10,0" VerticalAlignment="Center" HorizontalAlignment="Center">
8484
<Rectangle.OpacityMask>
8585
<VisualBrush Stretch="Uniform" Visual="{IconPacks:PackIconMaterial Kind=ChevronLeft}" />
8686
</Rectangle.OpacityMask>
@@ -110,12 +110,12 @@
110110
<RowDefinition Height="Auto" />
111111
<RowDefinition Height="*" />
112112
</Grid.RowDefinitions>
113-
<Rectangle Grid.Row="0" x:Name="Chevron" Width="16" Height="16" Fill="{DynamicResource GrayBrush3}" Margin="0,6.5,0,0" VerticalAlignment="Center" HorizontalAlignment="Center">
113+
<Rectangle Grid.Row="0" x:Name="Chevron" Width="16" Height="16" Fill="{DynamicResource GrayBrush3}" Margin="10,16.5,10,10" VerticalAlignment="Center" HorizontalAlignment="Center">
114114
<Rectangle.OpacityMask>
115115
<VisualBrush Stretch="Uniform" Visual="{IconPacks:PackIconMaterial Kind=ChevronRight}" />
116116
</Rectangle.OpacityMask>
117117
</Rectangle>
118-
<TextBlock Grid.Row="1" Text="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" FontSize="18" Style="{StaticResource HeaderTextBlock}" Margin="0" VerticalAlignment="Center">
118+
<TextBlock Grid.Row="1" Text="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" FontSize="18" Style="{StaticResource HeaderTextBlock}" Margin="0" VerticalAlignment="Center" HorizontalAlignment="Center">
119119
<TextBlock.LayoutTransform>
120120
<RotateTransform Angle="90" />
121121
</TextBlock.LayoutTransform>
@@ -136,7 +136,7 @@
136136
<Setter Property="BorderThickness" Value="0" />
137137
<Setter Property="Background" Value="Transparent" />
138138
<Setter Property="ExpandDirection" Value="Right" />
139-
<Setter Property="Padding" Value="0" />
139+
<Setter Property="Padding" Value="10" />
140140
<Setter Property="Controls:GroupBoxHelper.HeaderForeground" Value="{DynamicResource GrayBrush3}" />
141141
<Setter Property="Controls:ControlsHelper.ContentCharacterCasing" Value="Normal" />
142142
<Setter Property="Controls:ControlsHelper.HeaderFontSize" Value="14" />

‎Source/NETworkManager/Views/Applications/NetworkInterfaceView.xaml‎

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@
399399
<Binding ElementName="txtConfigSecondaryDnsServer" Path="(Validation.HasError)" />
400400
</MultiBinding>
401401
</DataTrigger.Binding>
402-
<Setter Property="IsEnabled" Value="False" />
402+
<Setter Property="IsEnabled" Value="False" />
403403
</DataTrigger>
404404
</Style.Triggers>
405405
</Style>
@@ -422,15 +422,23 @@
422422
</Button.Content>
423423
<Button.Style>
424424
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource ImageWithTextButton}">
425-
<Setter Property="IsEnabled" Value="False" />
426425
<Style.Triggers>
427-
<MultiDataTrigger>
428-
<MultiDataTrigger.Conditions>
429-
<Condition Binding="{Binding IsAdmin}" Value="True"/>
430-
<Condition Binding="{Binding ElementName=btnAddProfile,Path=IsEnabled}" Value="True"/>
431-
</MultiDataTrigger.Conditions>
432-
<Setter Property="IsEnabled" Value="True" />
433-
</MultiDataTrigger>
426+
<DataTrigger Value="False">
427+
<DataTrigger.Binding>
428+
<MultiBinding Converter="{StaticResource ValidateNetworkInterfaceProfileConverter}">
429+
<Binding Path="ConfigEnableDynamicIPAddress" />
430+
<Binding Path="ConfigEnableStaticIPAddress" />
431+
<Binding ElementName="txtConfigIPAddress" Path="(Validation.HasError)" />
432+
<Binding ElementName="cbConfigSubnetmaskOrCidr" Path="(Validation.HasError)" />
433+
<Binding ElementName="txtConfigGateway" Path="(Validation.HasError)" />
434+
<Binding Path="ConfigEnableDynamicDns" />
435+
<Binding Path="ConfigEnableStaticDns" />
436+
<Binding ElementName="txtConfigPrimaryDnsServer" Path="(Validation.HasError)" />
437+
<Binding ElementName="txtConfigSecondaryDnsServer" Path="(Validation.HasError)" />
438+
</MultiBinding>
439+
</DataTrigger.Binding>
440+
<Setter Property="IsEnabled" Value="False" />
441+
</DataTrigger>
434442
</Style.Triggers>
435443
</Style>
436444
</Button.Style>
@@ -439,7 +447,7 @@
439447
</Grid>
440448
<Border Grid.Column="1" BorderThickness="1,0,0,0" BorderBrush="{DynamicResource GrayBrush8}">
441449
<Expander x:Name="expanderProfile" Header="{DynamicResource String_Header_Profiles}" Style="{StaticResource ProfileExpander}" IsExpanded="{Binding ExpandProfileView}">
442-
<ListBox x:Name="listBoxProfiles" Width="250" FontSize="14" ItemsSource="{Binding NetworkInterfaceProfiles}" DisplayMemberPath="Name" SelectedItem="{Binding SelectedProfile}" Margin="0,10,0,0">
450+
<ListBox x:Name="listBoxProfiles" Width="250" FontSize="14" ItemsSource="{Binding NetworkInterfaceProfiles}" DisplayMemberPath="Name" SelectedItem="{Binding SelectedProfile}">
443451
<ListBox.Resources>
444452
<Style TargetType="{x:Type ScrollViewer}" BasedOn="{StaticResource DefaulScrollViewer}" />
445453
<ContextMenu x:Key="ListBoxItemContextMenu" Opened="ContextMenu_Opened" MinWidth="150">
@@ -461,7 +469,7 @@
461469
<KeyBinding Command="{Binding DeleteProfileCommand}" Key="Delete" />
462470
</ListBox.InputBindings>
463471
</ListBox>
464-
</Expander>
472+
</Expander>
465473
</Border>
466474
</Grid>
467475
</TabItem>

0 commit comments

Comments
 (0)