NetworkListView.xaml 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <Window
  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:local="clr-namespace:WinUI"
  7. mc:Ignorable="d" x:Class="WinUI.NetworkListView"
  8. Title="ZeroTier One" SizeToContent="Width" Height="500" Width="Auto" Icon="ZeroTierIcon.ico">
  9. <Window.Resources>
  10. <SolidColorBrush x:Key="GreenBrush" Color="#ff91a2a3"/>
  11. <SolidColorBrush x:Key="SolidBorderBrush" Color="#888" />
  12. <SolidColorBrush x:Key="GreenDisabledBrush" Color="#FF234447" />
  13. <SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#EEE" />
  14. <SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA" />
  15. <SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888" />
  16. <Style TargetType="{x:Type DataGrid}">
  17. <Setter Property="Background" Value="#FFF" />
  18. <Setter Property="AlternationCount" Value="2" />
  19. </Style>
  20. <Style TargetType="{x:Type DataGridRow}">
  21. <Style.Triggers>
  22. <Trigger Property="ItemsControl.AlternationIndex" Value="0">
  23. <Setter Property="Background" Value="#EEE"></Setter>
  24. </Trigger>
  25. <Trigger Property="ItemsControl.AlternationIndex" Value="1">
  26. <Setter Property="Background" Value="#FFF"></Setter>
  27. </Trigger>
  28. </Style.Triggers>
  29. </Style>
  30. <Style TargetType="{x:Type TabItem}">
  31. <Setter Property="Template">
  32. <Setter.Value>
  33. <ControlTemplate TargetType="{x:Type TabItem}">
  34. <Grid>
  35. <Border
  36. Name="Border"
  37. Margin="0,0,-4,0"
  38. Background="{StaticResource GreenBrush}"
  39. BorderBrush="{StaticResource SolidBorderBrush}"
  40. BorderThickness="1,1,1,1"
  41. CornerRadius="2,12,0,0" >
  42. <ContentPresenter x:Name="ContentSite"
  43. VerticalAlignment="Center"
  44. HorizontalAlignment="Center"
  45. ContentSource="Header"
  46. Margin="12,2,12,2"
  47. RecognizesAccessKey="True"/>
  48. </Border>
  49. </Grid>
  50. <ControlTemplate.Triggers>
  51. <Trigger Property="IsSelected" Value="True">
  52. <Setter Property="Panel.ZIndex" Value="100" />
  53. <Setter TargetName="Border" Property="Background" Value="{StaticResource GreenDisabledBrush}" />
  54. <Setter TargetName="Border" Property="BorderThickness" Value="1,1,1,0" />
  55. </Trigger>
  56. <Trigger Property="IsEnabled" Value="False">
  57. <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
  58. <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
  59. <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}" />
  60. </Trigger>
  61. </ControlTemplate.Triggers>
  62. </ControlTemplate>
  63. </Setter.Value>
  64. </Setter>
  65. </Style>
  66. </Window.Resources>
  67. <DockPanel>
  68. <Grid Background="LightGray" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
  69. <Grid.ColumnDefinitions>
  70. <ColumnDefinition Width="*"/>
  71. </Grid.ColumnDefinitions>
  72. <Grid.RowDefinitions>
  73. <RowDefinition Height="*"/>
  74. </Grid.RowDefinitions>
  75. <local:NetworksPage x:Name="networksPage" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="0" Margin="0,0,0,0"/>
  76. </Grid>
  77. </DockPanel>
  78. </Window>