ConfigWindow.xaml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <hc:Window x:Class="GeekDesk.Control.Windows.ConfigWindow"
  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:hc="https://handyorg.github.io/handycontrol"
  7. xmlns:local="clr-namespace:GeekDesk"
  8. mc:Ignorable="d"
  9. WindowStartupLocation="CenterScreen"
  10. Height="450"
  11. Width="600"
  12. WindowStyle="None"
  13. AllowsTransparency="True"
  14. Background="Transparent" ShowInTaskbar="False"
  15. >
  16. <Window.Resources>
  17. <Style x:Key="MenuStyle" TargetType="hc:SideMenuItem" BasedOn="{StaticResource SideMenuItemBaseStyle}">
  18. <Style.Setters>
  19. <Setter Property="Background" Value="AliceBlue"/>
  20. </Style.Setters>
  21. <Style.Triggers>
  22. <Trigger Property="IsMouseOver" Value="True">
  23. <Setter Property="Background" Value="#FFE2E2E2"/>
  24. </Trigger>
  25. <Trigger Property="IsSelected" Value="True">
  26. <Setter Property="Background" Value="#FFDAD7D7"/>
  27. </Trigger>
  28. </Style.Triggers>
  29. </Style>
  30. </Window.Resources>
  31. <Border CornerRadius="8" BorderThickness="0">
  32. <Border.Background>
  33. <SolidColorBrush Color="AliceBlue" Opacity="0.9"/>
  34. </Border.Background>
  35. <Grid>
  36. <Grid.RowDefinitions>
  37. <RowDefinition Height="*"/>
  38. </Grid.RowDefinitions>
  39. <Grid.ColumnDefinitions>
  40. <ColumnDefinition Width="140"/>
  41. <ColumnDefinition Width="*"/>
  42. </Grid.ColumnDefinitions>
  43. <hc:Card Grid.Row="0" Grid.Column="0">
  44. <hc:SideMenu BorderThickness="1"
  45. AutoSelect="True"
  46. >
  47. <hc:SideMenu.Background>
  48. <SolidColorBrush Color="AliceBlue"/>
  49. </hc:SideMenu.Background>
  50. <hc:SideMenu.ItemContainerStyle>
  51. <Style TargetType="hc:SideMenuItem" BasedOn="{StaticResource MenuStyle}"/>
  52. </hc:SideMenu.ItemContainerStyle>
  53. <hc:SideMenuItem Header="关于"
  54. IsSelected="True"
  55. Selected="MemuClick"
  56. Tag="About"
  57. >
  58. <hc:SideMenuItem.Icon>
  59. <Button Background="Transparent"
  60. IsEnabled="False"
  61. Opacity="1"
  62. BorderThickness="0"
  63. hc:IconElement.Geometry="{StaticResource About}"
  64. hc:IconElement.Height="18"
  65. hc:IconElement.Width="18"
  66. HorizontalAlignment="Right"
  67. />
  68. </hc:SideMenuItem.Icon>
  69. </hc:SideMenuItem>
  70. <hc:SideMenuItem Header="显示设置"
  71. Tag="Theme"
  72. Selected="MemuClick">
  73. <hc:SideMenuItem.Icon>
  74. <Button Background="Transparent"
  75. IsEnabled="False"
  76. Opacity="1"
  77. BorderThickness="0"
  78. hc:IconElement.Geometry="{StaticResource Pannel}"
  79. hc:IconElement.Height="18"
  80. hc:IconElement.Width="18"
  81. HorizontalAlignment="Right"
  82. />
  83. </hc:SideMenuItem.Icon>
  84. </hc:SideMenuItem>
  85. <hc:SideMenuItem Header="动作"
  86. Tag="Motion"
  87. Selected="MemuClick">
  88. <hc:SideMenuItem.Icon>
  89. <Button Background="Transparent"
  90. IsEnabled="False"
  91. Opacity="1"
  92. BorderThickness="0"
  93. hc:IconElement.Geometry="{StaticResource Motion}"
  94. hc:IconElement.Height="18"
  95. hc:IconElement.Width="18"
  96. HorizontalAlignment="Right"
  97. />
  98. </hc:SideMenuItem.Icon>
  99. </hc:SideMenuItem>
  100. </hc:SideMenu>
  101. </hc:Card>
  102. <hc:ScrollViewer Grid.Row="0" Grid.Column="1">
  103. <hc:Card x:Name="RightCard" Height="450" MouseDown="DragMove">
  104. </hc:Card>
  105. </hc:ScrollViewer>
  106. <Button Width="22" Height="22" Click="Close_Button_Click" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,10,10,0" Grid.Column="1"/>
  107. </Grid>
  108. </Border>
  109. </hc:Window>