修改页面主题颜色风格

This commit is contained in:
MoYue 2024-04-29 19:07:08 +08:00
parent ddd1ea5887
commit c52b64532f

View File

@ -10,10 +10,10 @@
WindowStartupLocation="CenterScreen"
FontFamily="{StaticResource DigitalDisplay}"
FontSize="13"
Foreground="#333"
Foreground="White"
FontWeight="ExtraLight"
Background="#FAFCFF"
Title="原位实验室主控系统" Height="750" Width="1300">
Title="原位实验室主控系统" Height="800" Width="1400">
<WindowChrome.WindowChrome>
<WindowChrome GlassFrameThickness="1"
NonClientFrameEdges="None"/>
@ -117,7 +117,7 @@
<DockPanel>
<!--左侧菜单-->
<Border BorderBrush="#EEE" BorderThickness="0,0,1,0">
<Border BorderBrush="#EEE" BorderThickness="0,0,1,0" >
<Grid Width="200" DockPanel.Dock="Left">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
@ -130,15 +130,14 @@
VerticalAlignment="Center" Foreground="#444" FontWeight="Normal" Margin="10,0"/>
</StackPanel>
<TreeView Grid.Row="1" Background="Transparent" BorderThickness="0"
ItemsSource="{Binding Menus}">
<TreeView Grid.Row="1" Background="Transparent" BorderThickness="0" ItemsSource="{Binding Menus}">
<TreeView.Resources>
<ControlTemplate TargetType="ToggleButton" x:Key="ArrowButtonTemplate">
<Grid Background="Transparent" Name="back">
<TextBlock Text="&#xe81d;" FontFamily="{StaticResource Icons}"
VerticalAlignment="Center" HorizontalAlignment="Center"
RenderTransformOrigin="0.5,0.5" Name="arrow"
Foreground="{TemplateBinding Foreground}"
Foreground="White"
FontSize="9">
</TextBlock>
</Grid>
@ -195,8 +194,6 @@
<ItemsPresenter x:Name="ItemsHost" Margin="18,0,0,0" Grid.ColumnSpan="2" Grid.Row="1" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsExpanded" Value="false">
<Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
@ -235,9 +232,9 @@
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding MenuIcon}"
FontFamily="{StaticResource Icons}"
VerticalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="15"/>
<TextBlock Text="{Binding MenuHeader}" Grid.Column="1" Margin="5,0,0,0" FontSize="12"
<TextBlock Text="{Binding MenuHeader}" Grid.Column="1" Margin="5,0,0,0" FontSize="15"
VerticalAlignment="Center"/>
</Grid>
<HierarchicalDataTemplate.Triggers>
@ -249,7 +246,6 @@
</TreeView.ItemTemplate>
</TreeView>
</Grid>
</Border>
@ -260,12 +256,12 @@
<RowDefinition/>
</Grid.RowDefinitions>
<Border Grid.Row="1" Background="#F0F6FB"/>
<Border Grid.Row="1" Background="#F0F6FB" />
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left"
Margin="15,0">
<Run Text="原位实验室主控系统" FontSize="14" FontWeight="ExtraBold"/>
<Run Text="v1.0" FontSize="11"/>
<Run Text="原位实验室主控系统" FontSize="15" FontWeight="ExtraBold"/>
<Run Text="v1.0" FontSize="13"/>
</TextBlock>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center"
@ -280,7 +276,7 @@
</StackPanel.Resources>
<!--时间和星期-->
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="2" Margin="37,0" FontSize="13" FontWeight="Normal"
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="2" Margin="37,0" FontSize="15" FontWeight="Normal"
Foreground="#555" DataContext="{x:Static sys:DateTime.Now}" Name="txt_time">
<Run Text="{Binding Now,Mode=OneWay,StringFormat='yyyy年MM月dd日'}" Name="txt_date" DataContext="{x:Static sys:DateTime.Now}" />
<Run Text=" "/>
@ -310,7 +306,7 @@
<ToggleButton Content="{Binding CurrentUser.RealName}"
ContentStringFormat="Hi! {0}"
VerticalAlignment="Center"
FontSize="11" FontWeight="Normal" Foreground="#888"
FontSize="14" FontWeight="Normal" Foreground="White"
Margin="0,0,10,0" Name="tbtn_user"
Height="30"
WindowChrome.IsHitTestVisibleInChrome="True"
@ -318,17 +314,17 @@
<!--最小化按钮-->
<Button Content="&#xe7e6;" FontFamily="{StaticResource Icons}"
Style="{StaticResource ControlButtonStyle}"
Style="{StaticResource ControlButtonStyle}" Foreground="White"
Click="Button_MinClick"/>
<!--最大化按钮-->
<Button Content="&#xe694;" FontFamily="{StaticResource Icons}"
Style="{StaticResource ControlButtonStyle}"
Style="{StaticResource ControlButtonStyle}" Foreground="White"
Click="Button_MaxClick"/>
<!--关闭按钮-->
<Button Content="&#xe625;" FontFamily="{StaticResource Icons}"
Style="{StaticResource ControlButtonStyle}"
Style="{StaticResource ControlButtonStyle}" Foreground="White"
Click="Button_Click"/>
</StackPanel>
@ -378,7 +374,7 @@
</Popup>
<!--更换用户姓名等信息-->
<Popup StaysOpen="False" IsOpen="{Binding ElementName=tbtn_user,Path=IsChecked}" PlacementTarget="{Binding ElementName=tbtn_user}" Placement="Right" HorizontalOffset="-160" VerticalOffset="33" AllowsTransparency="True">
<Popup StaysOpen="False" IsOpen="{Binding ElementName=tbtn_user,Path=IsChecked}" PlacementTarget="{Binding ElementName=tbtn_user}" Placement="Right" HorizontalOffset="-160" VerticalOffset="33" AllowsTransparency="True" >
<Grid Margin="5">
<!--背景-->
<Border Width="160" Height="200" Background="#FFF" CornerRadius="5">
@ -422,14 +418,14 @@
<!--用户真实姓名-->
<TextBlock Text="{Binding CurrentUser.RealName}"
Grid.Row="1" HorizontalAlignment="Center"
FontWeight="Bold"/>
FontWeight="Bold" FontSize="14"/>
<!--用户年龄及性别-->
<StackPanel Grid.Row="2" VerticalAlignment="Center"
HorizontalAlignment="Center"
HorizontalAlignment="Center"
Orientation="Horizontal" TextBlock.FontSize="11">
<TextBlock Text="{Binding CurrentUser.Age}" Margin="5,0"/>
<TextBlock Text="{Binding CurrentUser.Gender1}" Margin="5,0"/>
<TextBlock Text="{Binding CurrentUser.Age}" Margin="5,0" FontSize="14"/>
<TextBlock Text="{Binding CurrentUser.Gender1}" Margin="5,0" FontSize="14"/>
</StackPanel>
<Border Background="#EEE" Height="0.5" Grid.Row="3"/>
@ -438,14 +434,14 @@
<Button Content="修改密码" Grid.Row="4"
Style="{StaticResource NormalButtonStyle}"
Background="Transparent" Foreground="#409EFE"
Margin="5,3" FontSize="12"
Margin="5,3" FontSize="13"
Command="{Binding ModifyPasswordCommand}"/>
<!--切换账号-->
<Button Content="切换账号" Grid.Row="5"
Style="{StaticResource NormalButtonStyle}"
Background="Transparent" Foreground="#409EFE"
Margin="5,3" FontSize="12"
Margin="5,3" FontSize="13"
Command="{Binding SwitchCommand}"/>
</Grid>
</Grid>
@ -453,7 +449,7 @@
<TabControl Grid.Row="1" Background="Transparent"
BorderThickness="0" p:RegionManager.RegionName="MainRegion">
BorderThickness="0" p:RegionManager.RegionName="MainRegion" >
<TabControl.Resources>
<Style TargetType="TabControl">
@ -465,7 +461,7 @@
<RowDefinition Height="auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border Background="#FAFCFF" BorderBrush="#EEE" BorderThickness="0,1"/>
<Border Background="#FAFCFF" BorderBrush="#EEE" BorderThickness="0,1,0,0"/>
<TabPanel x:Name="HeaderPanel"
Panel.ZIndex="1"
Margin="0,3"
@ -517,8 +513,8 @@
<ColumnDefinition Width="auto" MaxWidth="30" MinWidth="10"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{TemplateBinding Header}" VerticalAlignment="Center"
Margin="10,5,0,5"
FontSize="12"/>
Margin="10,5,0,5"
FontSize="14"/>
<Grid Grid.Column="1" Name="close_grid" Visibility="Collapsed"
Width="30" Margin="0,0,-3,0">
<Button Grid.Column="1" Style="{StaticResource TabCloseButtonStyle}"
@ -534,7 +530,7 @@
<Setter TargetName="close_grid" Property="Visibility" Value="Visible"/>
</DataTrigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Visibility" Value="Visible" TargetName="close_btn"/>
<Setter Property="Visibility" Value="Visible" TargetName="close_btn" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Visibility" Value="Visible" TargetName="close_btn"/>
@ -545,7 +541,7 @@
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#EEE"/>
<Setter Property="Background" Value="Gray"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background">