|
478 | 478 | </Grid> |
479 | 479 | <Border Grid.Column="1" BorderThickness="1,0,0,0" BorderBrush="{DynamicResource GrayBrush8}"> |
480 | 480 | <Expander x:Name="expanderProfile" Header="{DynamicResource String_Header_Profiles}" Style="{StaticResource ProfileExpander}" IsExpanded="{Binding ExpandProfileView}"> |
481 | | - <ListBox x:Name="listBoxProfiles" Width="250" FontSize="14" ItemsSource="{Binding NetworkInterfaceProfiles}" DisplayMemberPath="Name" SelectedItem="{Binding SelectedProfile}"> |
482 | | - <ListBox.Resources> |
483 | | - <Style TargetType="{x:Type ScrollViewer}" BasedOn="{StaticResource DefaulScrollViewer}" /> |
484 | | - <ContextMenu x:Key="ListBoxItemContextMenu" Opened="ContextMenu_Opened" MinWidth="150"> |
485 | | - <MenuItem Header="{DynamicResource String_Delete}" Command="{Binding DeleteProfileCommand}"> |
486 | | - <MenuItem.Icon> |
487 | | - <Rectangle Width="16" Height="16" Fill="{DynamicResource BlackColorBrush}"> |
488 | | - <Rectangle.OpacityMask> |
489 | | - <VisualBrush Stretch="Uniform" Visual="{IconPacks:PackIconMaterialLight Kind=Delete}" /> |
490 | | - </Rectangle.OpacityMask> |
491 | | - </Rectangle> |
492 | | - </MenuItem.Icon> |
493 | | - </MenuItem> |
494 | | - </ContextMenu> |
495 | | - <Style TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource MetroListBoxItem}"> |
496 | | - <Setter Property="ContextMenu" Value="{StaticResource ListBoxItemContextMenu}" /> |
497 | | - </Style> |
498 | | - </ListBox.Resources> |
499 | | - <ListBox.InputBindings> |
500 | | - <KeyBinding Command="{Binding DeleteProfileCommand}" Key="Delete" /> |
501 | | - </ListBox.InputBindings> |
502 | | - </ListBox> |
| 481 | + <Grid Width="250"> |
| 482 | + <Grid.RowDefinitions> |
| 483 | + <RowDefinition Height="*" /> |
| 484 | + </Grid.RowDefinitions> |
| 485 | + <ListBox Grid.Column="0" Grid.Row="0" x:Name="listBoxProfiles" FontSize="14" ItemsSource="{Binding NetworkInterfaceProfiles}" DisplayMemberPath="Name" SelectedItem="{Binding SelectedProfile}"> |
| 486 | + <ListBox.Resources> |
| 487 | + <Style TargetType="{x:Type ScrollViewer}" BasedOn="{StaticResource DefaulScrollViewer}" /> |
| 488 | + <ContextMenu x:Key="ListBoxItemContextMenu" Opened="ContextMenu_Opened" MinWidth="150"> |
| 489 | + <MenuItem Header="{DynamicResource String_Delete}" Command="{Binding DeleteProfileCommand}"> |
| 490 | + <MenuItem.Icon> |
| 491 | + <Rectangle Width="16" Height="16" Fill="{DynamicResource BlackColorBrush}"> |
| 492 | + <Rectangle.OpacityMask> |
| 493 | + <VisualBrush Stretch="Uniform" Visual="{IconPacks:PackIconMaterialLight Kind=Delete}" /> |
| 494 | + </Rectangle.OpacityMask> |
| 495 | + </Rectangle> |
| 496 | + </MenuItem.Icon> |
| 497 | + </MenuItem> |
| 498 | + </ContextMenu> |
| 499 | + <Style TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource MetroListBoxItem}"> |
| 500 | + <Setter Property="ContextMenu" Value="{StaticResource ListBoxItemContextMenu}" /> |
| 501 | + </Style> |
| 502 | + </ListBox.Resources> |
| 503 | + <ListBox.InputBindings> |
| 504 | + <KeyBinding Command="{Binding DeleteProfileCommand}" Key="Delete" /> |
| 505 | + </ListBox.InputBindings> |
| 506 | + </ListBox> |
| 507 | + <TextBlock Grid.Row="0" FontSize="18" Foreground="{DynamicResource GrayBrush3}" Text="{DynamicResource String_NoProfilesFoundCreateOne}" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="Wrap" TextAlignment="Center" Margin="10,0" > |
| 508 | + <TextBlock.Style> |
| 509 | + <Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource HeaderTextBlock}"> |
| 510 | + <Setter Property="Visibility" Value="Collapsed" /> |
| 511 | + <Style.Triggers> |
| 512 | + <DataTrigger Binding="{Binding NetworkInterfaceProfiles.Count}" Value="0"> |
| 513 | + <Setter Property="Visibility" Value="Visible" /> |
| 514 | + </DataTrigger> |
| 515 | + </Style.Triggers> |
| 516 | + </Style> |
| 517 | + </TextBlock.Style> |
| 518 | + </TextBlock> |
| 519 | + </Grid> |
503 | 520 | </Expander> |
504 | 521 | </Border> |
505 | 522 | </Grid> |
|
0 commit comments