MainWindow.xaml 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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.MainWindow"
  8. Title="ZeroTier One" Height="500" Width="425" 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. <StatusBar DockPanel.Dock="Bottom" Height="26" Background="#FF234447" Margin="0">
  69. <StatusBar.ItemsPanel>
  70. <ItemsPanelTemplate>
  71. <Grid>
  72. <Grid.RowDefinitions>
  73. <RowDefinition Height="*"/>
  74. </Grid.RowDefinitions>
  75. <Grid.ColumnDefinitions>
  76. <ColumnDefinition Width="Auto"/>
  77. <ColumnDefinition Width="Auto"/>
  78. <ColumnDefinition Width="Auto"/>
  79. <ColumnDefinition Width="*"/>
  80. <ColumnDefinition Width="Auto"/>
  81. <ColumnDefinition Width="Auto"/>
  82. </Grid.ColumnDefinitions>
  83. </Grid>
  84. </ItemsPanelTemplate>
  85. </StatusBar.ItemsPanel>
  86. <StatusBarItem Grid.Column="0" x:Name="networkId" Content="deadbeef00" Foreground="White" FontFamily="Lucida Console"/>
  87. <StatusBarItem Grid.Column="1" x:Name="onlineStatus" Content="ONLINE" Foreground="White" FontFamily="Lucida Console"/>
  88. <StatusBarItem Grid.Column="2" x:Name="versionString" Content="1.0.5" Foreground="White" FontFamily="Lucida Console"/>
  89. <StatusBarItem Grid.Column="3" x:Name="blank" Content="" Height="43" Foreground="White"/>
  90. <StatusBarItem Grid.Column="4">
  91. <TextBox x:Name="joinNetworkID" TextWrapping="Wrap" Width="140" HorizontalAlignment="Right" ToolTip="Enter Network ID" PreviewTextInput="OnNetworkEntered" MaxLength="16" FontFamily="Lucida Console" FontSize="12" BorderThickness="1"/>
  92. </StatusBarItem>
  93. <StatusBarItem Grid.Column="5" x:Name="statusBarButton" Foreground="White" RenderTransformOrigin="0.789,0.442">
  94. <Button x:Name="joinButton" Content="Join" Background="#FFFFB354" Width="76" Click="joinButton_Click"/>
  95. </StatusBarItem>
  96. </StatusBar>
  97. <!--<TabControl Margin="0,0,0,0">
  98. <TabItem x:Name="Networks" Header="Networks" Foreground="White" IsSelected="True" IsManipulationEnabled="True">-->
  99. <Grid Background="LightGray" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
  100. <Grid.ColumnDefinitions>
  101. <ColumnDefinition Width="*"/>
  102. </Grid.ColumnDefinitions>
  103. <Grid.RowDefinitions>
  104. <RowDefinition Height="*"/>
  105. </Grid.RowDefinitions>
  106. <local:NetworksPage x:Name="networksPage" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="0" Margin="0,0,0,0"/>
  107. </Grid>
  108. <!--</TabItem>-->
  109. <!--<TabItem x:Name="Peers" Header="Peers" Foreground="White">
  110. <Grid Background="#FFE5E5E5" HorizontalAlignment="Left" VerticalAlignment="Top">
  111. <Grid.ColumnDefinitions>
  112. <ColumnDefinition Width="*"/>
  113. </Grid.ColumnDefinitions>
  114. <Grid.RowDefinitions>
  115. <RowDefinition Height="*"/>
  116. </Grid.RowDefinitions>
  117. <local:PeersPage x:Name="peersPage" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Column="0" Grid.Row="0"/>
  118. </Grid>
  119. </TabItem>-->
  120. <!--</TabControl>-->
  121. </DockPanel>
  122. </Window>