MainWindow.xaml 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <Window x:Class="DefaultEdit.Views.MainWindow"
  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:DefaultEdit"
  7. xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
  8. xmlns:prism="http://prismlibrary.com/"
  9. prism:ViewModelLocator.AutoWireViewModel="True"
  10. mc:Ignorable="d"
  11. WindowStyle="None"
  12. Title="EA时代天使"
  13. Height="450"
  14. WindowState="Maximized"
  15. FontWeight="Bold"
  16. FontFamily="微软雅黑"
  17. MouseDoubleClick="Grid_MouseDown"
  18. SizeChanged="Window_SizeChanged"
  19. Width="800">
  20. <b:Interaction.Triggers>
  21. <b:EventTrigger EventName="Loaded">
  22. <b:InvokeCommandAction Command="{Binding LoadedCommand}" />
  23. </b:EventTrigger>
  24. <b:EventTrigger EventName="Closed">
  25. <b:InvokeCommandAction Command="{Binding ClosedCommand}" />
  26. </b:EventTrigger>
  27. </b:Interaction.Triggers>
  28. <WindowChrome.WindowChrome>
  29. <WindowChrome GlassFrameThickness="50"
  30. CaptionHeight="30"
  31. NonClientFrameEdges="Left,Bottom,Right"
  32. CornerRadius="20" />
  33. </WindowChrome.WindowChrome>
  34. <Window.Resources>
  35. <Style x:Key="buttonborder"
  36. TargetType="Border">
  37. <Setter Property="BorderThickness"
  38. Value="2" />
  39. <Setter Property="Background"
  40. Value="Transparent" />
  41. <Setter Property="VerticalAlignment"
  42. Value="Center" />
  43. <Setter Property="BorderBrush"
  44. Value="White" />
  45. <Setter Property="CornerRadius"
  46. Value="5" />
  47. <Setter Property="Effect">
  48. <Setter.Value>
  49. <DropShadowEffect BlurRadius="10"
  50. Direction="0"
  51. ShadowDepth="0"
  52. Color="#D4D8DD" />
  53. </Setter.Value>
  54. </Setter>
  55. </Style>
  56. </Window.Resources>
  57. <Border BorderBrush="AliceBlue"
  58. BorderThickness="2"
  59. Margin="10"
  60. CornerRadius="10">
  61. <Border.Background>
  62. <LinearGradientBrush>
  63. <GradientStop Color="#95DDFD"
  64. Offset="0" />
  65. <GradientStop Color="#97B8FF"
  66. Offset="0.4" />
  67. <GradientStop Color="#2961AC"
  68. Offset="0.9" />
  69. </LinearGradientBrush>
  70. </Border.Background>
  71. <Grid Background="White"
  72. Opacity="0.8">
  73. <Grid.RowDefinitions>
  74. <RowDefinition Height="70" />
  75. <RowDefinition />
  76. </Grid.RowDefinitions>
  77. <Grid Grid.Row="0"
  78. VerticalAlignment="Center">
  79. <StackPanel Orientation="Horizontal">
  80. <TextBlock Text="EA时代天使"
  81. FontSize="26"
  82. Margin="30,20,0,0"
  83. FontWeight="Bold" />
  84. </StackPanel>
  85. <StackPanel Orientation="Horizontal"
  86. VerticalAlignment="Top"
  87. Height="65"
  88. HorizontalAlignment="Right">
  89. <TextBlock Text="当前时间:"
  90. FontSize="16"
  91. Margin="5,5,5,10"
  92. VerticalAlignment="Bottom" />
  93. <TextBlock Text="{Binding Management.DateTimeNow,StringFormat=yyyy-MM-dd HH:mm:ss}"
  94. FontSize="16"
  95. Margin="0,0,25,10"
  96. VerticalAlignment="Bottom" />
  97. <!--<Border Style="{StaticResource buttonborder}">
  98. <Button Content="权限登录"
  99. VerticalAlignment="Top"
  100. Command="{Binding OpenRoleLoginViewCommand}"
  101. Padding="5"
  102. BorderBrush="Transparent"
  103. FontSize="15"
  104. WindowChrome.IsHitTestVisibleInChrome="True"
  105. Background="Transparent" />
  106. </Border>-->
  107. <Border Style="{StaticResource buttonborder}">
  108. <Button Content="参数界面"
  109. VerticalAlignment="Top"
  110. Padding="5"
  111. BorderBrush="Transparent"
  112. FontSize="15"
  113. Command="{Binding OpenMenuViewCommand}"
  114. WindowChrome.IsHitTestVisibleInChrome="True"
  115. Background="Transparent" />
  116. </Border>
  117. <Border Style="{StaticResource buttonborder}">
  118. <Button Content="主界面"
  119. VerticalAlignment="Top"
  120. Padding="5"
  121. BorderBrush="Transparent"
  122. FontSize="15"
  123. Command="{Binding OpenWorkRunViewCommand}"
  124. WindowChrome.IsHitTestVisibleInChrome="True"
  125. Background="Transparent" />
  126. </Border>
  127. <Button Content="➖"
  128. Margin="0,10,0,0"
  129. VerticalAlignment="Top"
  130. Name="btnNormal"
  131. Click="btnNormal_Click"
  132. Width="45"
  133. FontWeight="Bold"
  134. FontSize="15"
  135. BorderThickness="0"
  136. WindowChrome.IsHitTestVisibleInChrome="True"
  137. Background="Transparent" />
  138. <Button Content="⭕"
  139. Margin="0,7,0,0"
  140. VerticalAlignment="Top"
  141. Click="btnMaximize_Click"
  142. Name="btnMaximize"
  143. Width="45"
  144. FontWeight="Bold"
  145. FontSize="20"
  146. BorderThickness="0"
  147. WindowChrome.IsHitTestVisibleInChrome="True"
  148. Background="Transparent" />
  149. <Button Content="❌"
  150. Margin="0,10,0,0"
  151. VerticalAlignment="Top"
  152. Width="45"
  153. Command="{Binding CloseViewCommand}"
  154. CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}"
  155. FontWeight="Bold"
  156. FontSize="15"
  157. BorderThickness="0"
  158. WindowChrome.IsHitTestVisibleInChrome="True"
  159. Background="Transparent" />
  160. </StackPanel>
  161. </Grid>
  162. <Grid Grid.Row="1">
  163. <ContentControl prism:RegionManager.RegionName="RegionContent" />
  164. </Grid>
  165. </Grid>
  166. </Border>
  167. </Window>