2024-03-11 05:12:02 +00:00
|
|
|
<Window x:Class="InSituLaboratory.Views.MainView"
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
xmlns:local="clr-namespace:InSituLaboratory.Views"
|
|
|
|
|
xmlns:p="http://prismlibrary.com/"
|
|
|
|
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
|
|
|
|
mc:Ignorable="d"
|
|
|
|
|
WindowStartupLocation="CenterScreen"
|
2024-04-10 09:50:54 +00:00
|
|
|
FontFamily="{StaticResource DigitalDisplay}"
|
|
|
|
|
FontSize="13"
|
2024-04-30 00:57:08 +00:00
|
|
|
Foreground="#333"
|
2024-03-11 05:12:02 +00:00
|
|
|
FontWeight="ExtraLight"
|
2024-07-09 06:01:02 +00:00
|
|
|
Background="#14273a"
|
|
|
|
|
Title="原位实验室主控系统" Height="900" Width="1590">
|
2024-03-11 05:12:02 +00:00
|
|
|
<WindowChrome.WindowChrome>
|
|
|
|
|
<WindowChrome GlassFrameThickness="1"
|
|
|
|
|
NonClientFrameEdges="None"/>
|
|
|
|
|
</WindowChrome.WindowChrome>
|
|
|
|
|
<Window.Resources>
|
|
|
|
|
<Style TargetType="ToggleButton" x:Key="UserIconButtonStyle">
|
|
|
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
|
|
|
<Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True"/>
|
|
|
|
|
<Setter Property="Cursor" Value="Hand"/>
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="ToggleButton">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Border Width="30" Height="30" CornerRadius="20"
|
|
|
|
|
BorderBrush="White" BorderThickness="1" Background="White"
|
|
|
|
|
Name="border" Visibility="Collapsed">
|
|
|
|
|
<Border.Effect>
|
|
|
|
|
<DropShadowEffect BlurRadius="5" ShadowDepth="0"
|
|
|
|
|
Color="Black" Opacity="0.3"/>
|
|
|
|
|
</Border.Effect>
|
|
|
|
|
</Border>
|
|
|
|
|
<Border Width="30" Height="30" CornerRadius="20"
|
|
|
|
|
BorderBrush="Transparent" BorderThickness="1">
|
|
|
|
|
<Border.Background>
|
|
|
|
|
<ImageBrush ImageSource="{Binding Content,RelativeSource={RelativeSource Mode=TemplatedParent}}"/>
|
|
|
|
|
</Border.Background>
|
|
|
|
|
</Border>
|
|
|
|
|
</Grid>
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
<Setter TargetName="border" Property="Visibility" Value="Visible"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="IsChecked" Value="True">
|
|
|
|
|
<Setter TargetName="border" Property="Visibility" Value="Visible"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
<Style TargetType="Button" x:Key="AvatarItemButtonStyle">
|
|
|
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="Button">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Border Width="30" Height="30" CornerRadius="5"
|
|
|
|
|
Background="White" Name="border" Visibility="Collapsed">
|
|
|
|
|
<Border.Effect>
|
|
|
|
|
<DropShadowEffect BlurRadius="5" ShadowDepth="0"
|
|
|
|
|
Color="Black" Opacity="0.3"/>
|
|
|
|
|
</Border.Effect>
|
|
|
|
|
</Border>
|
|
|
|
|
<Border Width="30" Height="30" CornerRadius="5"
|
|
|
|
|
BorderBrush="White" BorderThickness="1" >
|
|
|
|
|
<Border.Background>
|
|
|
|
|
<ImageBrush ImageSource="{Binding Content,RelativeSource={RelativeSource Mode=TemplatedParent}}"/>
|
|
|
|
|
</Border.Background>
|
|
|
|
|
<ContentPresenter VerticalAlignment="Center"
|
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
Visibility="Collapsed"
|
|
|
|
|
Name="cp"/>
|
|
|
|
|
</Border>
|
|
|
|
|
</Grid>
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
<Setter TargetName="border" Property="Visibility" Value="Visible"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="CommandParameter" Value="{x:Null}">
|
|
|
|
|
<Setter Property="Visibility" Value="Visible" TargetName="cp"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
</Window.Resources>
|
|
|
|
|
|
|
|
|
|
<!--时间日期样式模板-->
|
|
|
|
|
<Window.Triggers>
|
|
|
|
|
<EventTrigger RoutedEvent="UserControl.Loaded">
|
|
|
|
|
<BeginStoryboard>
|
|
|
|
|
<Storyboard>
|
|
|
|
|
<!--日期的变化-->
|
|
|
|
|
<ObjectAnimationUsingKeyFrames Duration="1:0:1" Storyboard.TargetName="txt_date"
|
|
|
|
|
Storyboard.TargetProperty="DataContext" RepeatBehavior="Forever">
|
|
|
|
|
<DiscreteObjectKeyFrame Value="{x:Static sys:DateTime.Now}" KeyTime="0:0:0"/>
|
|
|
|
|
<DiscreteObjectKeyFrame Value="{x:Static sys:DateTime.Now}" KeyTime="1:0:0"/>
|
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
|
<!--时间的变化-->
|
|
|
|
|
<ObjectAnimationUsingKeyFrames Duration="0:0:2" Storyboard.TargetName="txt_time"
|
|
|
|
|
Storyboard.TargetProperty="DataContext" RepeatBehavior="Forever">
|
|
|
|
|
<DiscreteObjectKeyFrame Value="{x:Static sys:DateTime.Now}" KeyTime="0:0:0"/>
|
|
|
|
|
<DiscreteObjectKeyFrame Value="{x:Static sys:DateTime.Now}" KeyTime="0:0:1"/>
|
|
|
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
|
</Storyboard>
|
|
|
|
|
</BeginStoryboard>
|
|
|
|
|
</EventTrigger>
|
|
|
|
|
</Window.Triggers>
|
|
|
|
|
|
|
|
|
|
<DockPanel>
|
|
|
|
|
<!--左侧菜单-->
|
2024-07-09 06:01:02 +00:00
|
|
|
<Border BorderBrush="Gray" BorderThickness="0,0,1,0" >
|
2024-03-11 05:12:02 +00:00
|
|
|
<Grid Width="200" DockPanel.Dock="Left">
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="auto"/>
|
|
|
|
|
<RowDefinition/>
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="0,20" HorizontalAlignment="Center">
|
2024-03-30 00:17:37 +00:00
|
|
|
<Image Source="/InSituLaboratory.Assets;component/Images/6604cd8ecc29d.ico" Width="36"/>
|
2024-03-11 05:12:02 +00:00
|
|
|
<TextBlock Text="化学生物实验室" FontSize="15" HorizontalAlignment="Center"
|
2024-07-09 06:01:02 +00:00
|
|
|
VerticalAlignment="Center" Foreground="White" FontWeight="Normal" Margin="10,0"/>
|
2024-03-11 05:12:02 +00:00
|
|
|
</StackPanel>
|
|
|
|
|
|
2024-04-29 11:07:08 +00:00
|
|
|
<TreeView Grid.Row="1" Background="Transparent" BorderThickness="0" ItemsSource="{Binding Menus}">
|
2024-03-11 05:12:02 +00:00
|
|
|
<TreeView.Resources>
|
|
|
|
|
<ControlTemplate TargetType="ToggleButton" x:Key="ArrowButtonTemplate">
|
|
|
|
|
<Grid Background="Transparent" Name="back">
|
|
|
|
|
<TextBlock Text="" FontFamily="{StaticResource Icons}"
|
|
|
|
|
VerticalAlignment="Center" HorizontalAlignment="Center"
|
|
|
|
|
RenderTransformOrigin="0.5,0.5" Name="arrow"
|
|
|
|
|
FontSize="9">
|
|
|
|
|
</TextBlock>
|
|
|
|
|
</Grid>
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
<Trigger Property="IsChecked" Value="True">
|
|
|
|
|
<Setter TargetName="arrow" Property="RenderTransform">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<RotateTransform Angle="90"/>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
<Setter TargetName="back" Property="Background" Value="#11000000"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
|
|
|
|
|
<Style TargetType="TreeViewItem">
|
|
|
|
|
<Setter Property="IsExpanded" Value="{Binding IsExpanded}"/>
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="TreeViewItem">
|
|
|
|
|
<Grid Background="Transparent" Name="root">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition/>
|
|
|
|
|
<ColumnDefinition MaxWidth="30"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="Auto" MinHeight="33"/>
|
|
|
|
|
<RowDefinition />
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<Grid.InputBindings>
|
|
|
|
|
<MouseBinding MouseAction="LeftDoubleClick"
|
|
|
|
|
Command="{Binding DataContext.OpenViewCommand,RelativeSource={RelativeSource AncestorType=Window}}"
|
|
|
|
|
CommandParameter="{Binding}"/>
|
|
|
|
|
</Grid.InputBindings>
|
|
|
|
|
|
|
|
|
|
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
|
Background="{TemplateBinding Background}"
|
|
|
|
|
CornerRadius="5" Grid.ColumnSpan="2" Padding="{TemplateBinding Padding}"
|
|
|
|
|
SnapsToDevicePixels="true"
|
|
|
|
|
Margin="2,1">
|
|
|
|
|
<ContentPresenter x:Name="PART_Header" ContentSource="Header"
|
|
|
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
|
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
|
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
|
|
|
|
|
</ContentPresenter>
|
|
|
|
|
</Border>
|
|
|
|
|
<ToggleButton x:Name="Expander" Grid.Column="1" ClickMode="Press"
|
|
|
|
|
IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}"
|
|
|
|
|
Template="{StaticResource ArrowButtonTemplate}"
|
2024-07-09 06:01:02 +00:00
|
|
|
Foreground="White"/>
|
2024-03-11 05:12:02 +00:00
|
|
|
<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"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="HasItems" Value="false">
|
|
|
|
|
<Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="IsSelected" Value="true">
|
|
|
|
|
<Setter Property="Background" TargetName="Bd">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
|
|
|
|
|
<GradientStop Color="#FE582D" Offset="0"/>
|
|
|
|
|
<GradientStop Color="#F1961A" Offset="1"/>
|
|
|
|
|
</LinearGradientBrush>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
<Setter Property="Foreground" Value="White"/>
|
|
|
|
|
<Setter Property="Foreground" Value="white" TargetName="Expander"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
<!--被选中后失去焦点-->
|
|
|
|
|
<DataTrigger Binding="{Binding MenuIcon}" Value="{x:Null}">
|
|
|
|
|
<Setter Property="Margin" Value="10,0,0,0" TargetName="root"/>
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
</TreeView.Resources>
|
|
|
|
|
<TreeView.ItemTemplate>
|
|
|
|
|
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
|
|
|
|
|
<Grid Background="Transparent">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="30" Name="c1"/>
|
|
|
|
|
<ColumnDefinition/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<TextBlock Text="{Binding MenuIcon}"
|
2024-07-09 06:01:02 +00:00
|
|
|
FontFamily="{StaticResource Icons}" Foreground="White"
|
2024-04-29 11:07:08 +00:00
|
|
|
VerticalAlignment="Center" HorizontalAlignment="Center"
|
2024-03-11 05:12:02 +00:00
|
|
|
FontSize="15"/>
|
2024-07-09 06:01:02 +00:00
|
|
|
<TextBlock Text="{Binding MenuHeader}" Grid.Column="1" Margin="5,0,0,0" FontSize="15" Foreground="White"
|
2024-03-11 05:12:02 +00:00
|
|
|
VerticalAlignment="Center"/>
|
|
|
|
|
</Grid>
|
|
|
|
|
<HierarchicalDataTemplate.Triggers>
|
|
|
|
|
<DataTrigger Binding="{Binding MenuIcon}" Value="{x:Null}">
|
|
|
|
|
<Setter TargetName="c1" Property="Width" Value="0"/>
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
</HierarchicalDataTemplate.Triggers>
|
|
|
|
|
</HierarchicalDataTemplate>
|
|
|
|
|
</TreeView.ItemTemplate>
|
|
|
|
|
</TreeView>
|
|
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
<!--内容区域-->
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="45"/>
|
|
|
|
|
<RowDefinition/>
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
2024-04-29 11:07:08 +00:00
|
|
|
<Border Grid.Row="1" Background="#F0F6FB" />
|
2024-03-11 05:12:02 +00:00
|
|
|
|
2024-04-30 00:57:08 +00:00
|
|
|
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left"
|
2024-03-11 05:12:02 +00:00
|
|
|
Margin="15,0">
|
2024-07-09 06:01:02 +00:00
|
|
|
<Run Text="原位实验室主控系统" FontSize="15" FontWeight="ExtraBold" Foreground="White" />
|
|
|
|
|
<Run Text="v1.0" FontSize="13" Foreground="White"/>
|
2024-03-11 05:12:02 +00:00
|
|
|
</TextBlock>
|
|
|
|
|
|
|
|
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center"
|
|
|
|
|
HorizontalAlignment="Right"
|
|
|
|
|
Margin="0,0,10,0">
|
|
|
|
|
<StackPanel.Resources>
|
|
|
|
|
<ResourceDictionary>
|
|
|
|
|
<ResourceDictionary.MergedDictionaries>
|
|
|
|
|
<ResourceDictionary Source="/InSituLaboratory.Assets;component/Styles/ButtonStyles.xaml"/>
|
|
|
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
|
</ResourceDictionary>
|
|
|
|
|
</StackPanel.Resources>
|
|
|
|
|
|
|
|
|
|
<!--时间和星期-->
|
2024-04-30 00:57:08 +00:00
|
|
|
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="2" Margin="37,0" FontSize="16" FontWeight="Normal"
|
2024-07-09 06:01:02 +00:00
|
|
|
Foreground="White" DataContext="{x:Static sys:DateTime.Now}" Name="txt_time">
|
2024-03-11 05:12:02 +00:00
|
|
|
<Run Text="{Binding Now,Mode=OneWay,StringFormat='yyyy年MM月dd日'}" Name="txt_date" DataContext="{x:Static sys:DateTime.Now}" />
|
|
|
|
|
<Run Text=" "/>
|
|
|
|
|
<Run Text="{Binding Now,Mode=OneWay,StringFormat='HH:mm:ss'}" />
|
|
|
|
|
<Run Text=" "/>
|
|
|
|
|
<Run Text="{Binding Now,Mode=OneWay,StringFormat='dddd',ConverterCulture=zh-CN}"/>
|
|
|
|
|
</TextBlock>
|
|
|
|
|
|
|
|
|
|
<!--消息图标-->
|
|
|
|
|
<TextBlock Text="" FontFamily="{StaticResource Icons}"
|
|
|
|
|
VerticalAlignment="Center"
|
2024-07-09 06:01:02 +00:00
|
|
|
FontSize="18" Foreground="White"
|
2024-03-11 05:12:02 +00:00
|
|
|
Margin="0,0,10,0"/>
|
|
|
|
|
<!--咨询图标-->
|
|
|
|
|
<TextBlock Text="" FontFamily="{StaticResource Icons}"
|
|
|
|
|
VerticalAlignment="Center"
|
2024-07-09 06:01:02 +00:00
|
|
|
FontSize="18" Foreground="White"
|
2024-03-11 05:12:02 +00:00
|
|
|
Margin="0,0,20,0"/>
|
|
|
|
|
<!--登录用户头像-->
|
|
|
|
|
<ToggleButton Width="30" Height="30" Margin="0,0,5,0"
|
|
|
|
|
Style="{StaticResource UserIconButtonStyle}"
|
|
|
|
|
Content="{Binding CurrentUser.UserIcon}"
|
|
|
|
|
IsChecked="{Binding IsDropdownAvatar}"
|
|
|
|
|
Name="tbtn_avatar"/>
|
|
|
|
|
|
|
|
|
|
<!--登录用户姓名-->
|
|
|
|
|
<ToggleButton Content="{Binding CurrentUser.RealName}"
|
|
|
|
|
ContentStringFormat="Hi! {0}"
|
|
|
|
|
VerticalAlignment="Center"
|
2024-04-30 00:57:08 +00:00
|
|
|
FontSize="15" FontWeight="Normal"
|
2024-03-11 05:12:02 +00:00
|
|
|
Margin="0,0,10,0" Name="tbtn_user"
|
2024-07-09 06:01:02 +00:00
|
|
|
Height="30" Foreground="White"
|
2024-03-11 05:12:02 +00:00
|
|
|
WindowChrome.IsHitTestVisibleInChrome="True"
|
|
|
|
|
Style="{StaticResource UserInfoButtonStyle}"/>
|
|
|
|
|
|
|
|
|
|
<!--最小化按钮-->
|
|
|
|
|
<Button Content="" FontFamily="{StaticResource Icons}"
|
2024-07-09 06:01:02 +00:00
|
|
|
Style="{StaticResource ControlButtonStyle}" FontSize="15" Foreground="White"
|
2024-03-11 05:12:02 +00:00
|
|
|
Click="Button_MinClick"/>
|
|
|
|
|
|
|
|
|
|
<!--最大化按钮-->
|
|
|
|
|
<Button Content="" FontFamily="{StaticResource Icons}"
|
2024-07-09 06:01:02 +00:00
|
|
|
Style="{StaticResource ControlButtonStyle}" FontSize="15" Foreground="White"
|
2024-03-11 05:12:02 +00:00
|
|
|
Click="Button_MaxClick"/>
|
|
|
|
|
|
|
|
|
|
<!--关闭按钮-->
|
|
|
|
|
<Button Content="" FontFamily="{StaticResource Icons}"
|
2024-07-09 06:01:02 +00:00
|
|
|
Style="{StaticResource ControlButtonStyle}" FontSize="15" Foreground="White"
|
2024-03-11 05:12:02 +00:00
|
|
|
Click="Button_Click"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
<!--更换用户头像-->
|
2024-07-09 06:01:02 +00:00
|
|
|
<Popup StaysOpen="False" IsOpen="{Binding ElementName=tbtn_avatar,Path=IsChecked}" PlacementTarget="{Binding ElementName=tbtn_avatar}" AllowsTransparency="True">
|
2024-03-11 05:12:02 +00:00
|
|
|
<Grid Margin="5">
|
|
|
|
|
<Border Width="160" Height="100" Background="#FFF" CornerRadius="5">
|
|
|
|
|
<Border.Effect>
|
|
|
|
|
<DropShadowEffect BlurRadius="10" ShadowDepth="0" Direction="0" Color="Gray" Opacity="0.1"/>
|
|
|
|
|
</Border.Effect>
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
<UniformGrid Columns="4" Margin="5">
|
|
|
|
|
<Button Style="{StaticResource AvatarItemButtonStyle}"
|
|
|
|
|
Content="pack://siteoforigin:,,,/Avatars/a01.jpg"
|
|
|
|
|
CommandParameter="a01.jpg"
|
|
|
|
|
Command="{Binding SetAvatarCommand}"/>
|
|
|
|
|
<Button Style="{StaticResource AvatarItemButtonStyle}"
|
|
|
|
|
Content="pack://siteoforigin:,,,/Avatars/a02.jpg"
|
|
|
|
|
Command="{Binding SetAvatarCommand}"
|
|
|
|
|
CommandParameter="a02.jpg"/>
|
|
|
|
|
<Button Style="{StaticResource AvatarItemButtonStyle}"
|
|
|
|
|
Content="pack://siteoforigin:,,,/Avatars/a03.png"
|
|
|
|
|
Command="{Binding SetAvatarCommand}"
|
|
|
|
|
CommandParameter="a03.png"/>
|
|
|
|
|
<Button Style="{StaticResource AvatarItemButtonStyle}"
|
|
|
|
|
Content="pack://siteoforigin:,,,/Avatars/a04.jpg"
|
|
|
|
|
Command="{Binding SetAvatarCommand}"
|
|
|
|
|
CommandParameter="a04.jpg"/>
|
|
|
|
|
<Button Style="{StaticResource AvatarItemButtonStyle}"
|
|
|
|
|
Content="pack://siteoforigin:,,,/Avatars/a05.png"
|
|
|
|
|
Command="{Binding SetAvatarCommand}"
|
|
|
|
|
CommandParameter="a05.png"/>
|
|
|
|
|
<Button Style="{StaticResource AvatarItemButtonStyle}"
|
|
|
|
|
Content="pack://siteoforigin:,,,/Avatars/a06.jpg"
|
|
|
|
|
Command="{Binding SetAvatarCommand}"
|
|
|
|
|
CommandParameter="a06.jpg"/>
|
|
|
|
|
<Button Style="{StaticResource AvatarItemButtonStyle}"
|
|
|
|
|
Content="pack://siteoforigin:,,,/Avatars/a07.jpg"
|
|
|
|
|
Command="{Binding SetAvatarCommand}"
|
|
|
|
|
CommandParameter="a07.jpg"/>
|
|
|
|
|
<Button Style="{StaticResource AvatarItemButtonStyle}"
|
|
|
|
|
Command="{Binding SetAvatarCommand}"
|
|
|
|
|
Content="选择" FontSize="12" Foreground="#409EFE"/>
|
|
|
|
|
</UniformGrid>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Popup>
|
|
|
|
|
|
|
|
|
|
<!--更换用户姓名等信息-->
|
2024-04-29 11:07:08 +00:00
|
|
|
<Popup StaysOpen="False" IsOpen="{Binding ElementName=tbtn_user,Path=IsChecked}" PlacementTarget="{Binding ElementName=tbtn_user}" Placement="Right" HorizontalOffset="-160" VerticalOffset="33" AllowsTransparency="True" >
|
2024-03-11 05:12:02 +00:00
|
|
|
<Grid Margin="5">
|
|
|
|
|
<!--背景-->
|
|
|
|
|
<Border Width="160" Height="200" Background="#FFF" CornerRadius="5">
|
|
|
|
|
<Border.Effect>
|
|
|
|
|
<DropShadowEffect BlurRadius="10" ShadowDepth="0" Direction="0" Color="Gray" Opacity="0.1"/>
|
|
|
|
|
</Border.Effect>
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
<!--内容-->
|
|
|
|
|
<Grid TextBlock.Foreground="#666">
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="80"/>
|
|
|
|
|
<RowDefinition/>
|
|
|
|
|
<RowDefinition/>
|
|
|
|
|
<RowDefinition Height="10"/>
|
|
|
|
|
<RowDefinition Height="auto"/>
|
|
|
|
|
<RowDefinition Height="auto"/>
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<!--背景-->
|
|
|
|
|
<Border CornerRadius="5,5,0,0">
|
|
|
|
|
<Border.Background>
|
|
|
|
|
<ImageBrush ImageSource="{Binding CurrentUser.UserIcon}" Stretch="UniformToFill"/>
|
|
|
|
|
</Border.Background>
|
|
|
|
|
<Border.Effect>
|
|
|
|
|
<BlurEffect Radius="40"/>
|
|
|
|
|
</Border.Effect>
|
|
|
|
|
<!--边缘裁切-->
|
|
|
|
|
<Border.Clip>
|
|
|
|
|
<RectangleGeometry Rect="0,0,160,200" RadiusX="5" RadiusY="5"/>
|
|
|
|
|
</Border.Clip>
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
<!--用户头像-->
|
|
|
|
|
<Border Width="50" Height="50" CornerRadius="10"
|
|
|
|
|
Margin="0,0,5,0" BorderBrush="White" BorderThickness="1">
|
|
|
|
|
<Border.Background>
|
|
|
|
|
<ImageBrush ImageSource="{Binding CurrentUser.UserIcon}"/>
|
|
|
|
|
</Border.Background>
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
<!--用户真实姓名-->
|
|
|
|
|
<TextBlock Text="{Binding CurrentUser.RealName}"
|
|
|
|
|
Grid.Row="1" HorizontalAlignment="Center"
|
2024-04-30 00:57:08 +00:00
|
|
|
FontWeight="Bold" FontSize="15"/>
|
2024-03-11 05:12:02 +00:00
|
|
|
|
|
|
|
|
<!--用户年龄及性别-->
|
|
|
|
|
<StackPanel Grid.Row="2" VerticalAlignment="Center"
|
2024-04-29 11:07:08 +00:00
|
|
|
HorizontalAlignment="Center"
|
2024-03-11 05:12:02 +00:00
|
|
|
Orientation="Horizontal" TextBlock.FontSize="11">
|
2024-04-30 00:57:08 +00:00
|
|
|
<TextBlock Text="{Binding CurrentUser.Age}" Margin="5,0" FontSize="15"/>
|
|
|
|
|
<TextBlock Text="{Binding CurrentUser.Gender1}" Margin="5,0" FontSize="15"/>
|
2024-03-11 05:12:02 +00:00
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
<Border Background="#EEE" Height="0.5" Grid.Row="3"/>
|
|
|
|
|
|
|
|
|
|
<!--修改密码-->
|
|
|
|
|
<Button Content="修改密码" Grid.Row="4"
|
|
|
|
|
Style="{StaticResource NormalButtonStyle}"
|
|
|
|
|
Background="Transparent" Foreground="#409EFE"
|
2024-04-30 00:57:08 +00:00
|
|
|
Margin="5,3" FontSize="14"
|
2024-03-11 05:12:02 +00:00
|
|
|
Command="{Binding ModifyPasswordCommand}"/>
|
|
|
|
|
|
|
|
|
|
<!--切换账号-->
|
|
|
|
|
<Button Content="切换账号" Grid.Row="5"
|
|
|
|
|
Style="{StaticResource NormalButtonStyle}"
|
|
|
|
|
Background="Transparent" Foreground="#409EFE"
|
2024-04-30 00:57:08 +00:00
|
|
|
Margin="5,3" FontSize="14"
|
2024-03-11 05:12:02 +00:00
|
|
|
Command="{Binding SwitchCommand}"/>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Popup>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<TabControl Grid.Row="1" Background="Transparent"
|
2024-04-29 11:07:08 +00:00
|
|
|
BorderThickness="0" p:RegionManager.RegionName="MainRegion" >
|
2024-03-11 05:12:02 +00:00
|
|
|
<TabControl.Resources>
|
|
|
|
|
|
|
|
|
|
<Style TargetType="TabControl">
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="TabControl">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="auto"/>
|
|
|
|
|
<RowDefinition/>
|
|
|
|
|
</Grid.RowDefinitions>
|
2024-07-09 06:01:02 +00:00
|
|
|
<Border Background="#14273a" BorderBrush="Gray" BorderThickness="0,1,0,0"/>
|
2024-03-11 05:12:02 +00:00
|
|
|
<TabPanel x:Name="HeaderPanel"
|
|
|
|
|
Panel.ZIndex="1"
|
|
|
|
|
Margin="0,3"
|
|
|
|
|
IsItemsHost="True"
|
|
|
|
|
KeyboardNavigation.TabIndex="1"
|
|
|
|
|
Background="Transparent" />
|
|
|
|
|
|
|
|
|
|
<ContentPresenter x:Name="PART_SelectedContentHost"
|
|
|
|
|
Grid.Row="1"
|
|
|
|
|
ContentSource="SelectedContent" />
|
|
|
|
|
</Grid>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
<Style TargetType="Button" x:Key="TabCloseButtonStyle">
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="Button">
|
|
|
|
|
<Border VerticalAlignment="Center" HorizontalAlignment="Center"
|
|
|
|
|
CornerRadius="3" Background="Transparent"
|
|
|
|
|
Name="back">
|
|
|
|
|
<Path Data="M0 0 8 8M0 8 8 0" Margin="5"
|
|
|
|
|
Stroke="{TemplateBinding Foreground}" StrokeThickness="1"/>
|
|
|
|
|
</Border>
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
<Setter Property="Background" Value="#19000000" TargetName="back"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
<Style TargetType="TabItem">
|
|
|
|
|
<Setter Property="Header" Value="{Binding DataContext.PageTitle}"/>
|
2024-07-09 06:01:02 +00:00
|
|
|
<Setter Property="Background" Value="Gray"/>
|
2024-03-11 05:12:02 +00:00
|
|
|
<Setter Property="Foreground" Value="#444"/>
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="TabItem">
|
|
|
|
|
<Border Background="{TemplateBinding Background}" Height="28"
|
|
|
|
|
CornerRadius="5" Margin="2,0">
|
|
|
|
|
<Grid Margin="5,0,3,0">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition/>
|
|
|
|
|
<ColumnDefinition Width="auto" MaxWidth="30" MinWidth="10"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<TextBlock Text="{TemplateBinding Header}" VerticalAlignment="Center"
|
2024-04-29 11:07:08 +00:00
|
|
|
Margin="10,5,0,5"
|
2024-04-30 00:57:08 +00:00
|
|
|
FontSize="15"/>
|
2024-03-11 05:12:02 +00:00
|
|
|
<Grid Grid.Column="1" Name="close_grid" Visibility="Collapsed"
|
|
|
|
|
Width="30" Margin="0,0,-3,0">
|
|
|
|
|
<Button Grid.Column="1" Style="{StaticResource TabCloseButtonStyle}"
|
|
|
|
|
Foreground="{TemplateBinding Foreground}"
|
|
|
|
|
Visibility="Collapsed" Name="close_btn"
|
|
|
|
|
Command="{Binding DataContext.CloseCommand}"/>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
<DataTrigger Binding="{Binding DataContext.IsCanClose}" Value="True">
|
|
|
|
|
<Setter TargetName="close_grid" Property="Visibility" Value="Visible"/>
|
|
|
|
|
</DataTrigger>
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
2024-04-29 11:07:08 +00:00
|
|
|
<Setter Property="Visibility" Value="Visible" TargetName="close_btn" />
|
2024-03-11 05:12:02 +00:00
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="IsSelected" Value="True">
|
|
|
|
|
<Setter Property="Visibility" Value="Visible" TargetName="close_btn"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
2024-07-09 06:01:02 +00:00
|
|
|
<Setter Property="Background" Value="white"/>
|
2024-03-11 05:12:02 +00:00
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="IsSelected" Value="True">
|
|
|
|
|
<Setter Property="Background">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
|
|
|
|
|
<GradientStop Color="#FE582D" Offset="0"/>
|
|
|
|
|
<GradientStop Color="#F1961A" Offset="1"/>
|
|
|
|
|
</LinearGradientBrush>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
<Setter Property="Foreground" Value="White"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
</TabControl.Resources>
|
|
|
|
|
</TabControl>
|
|
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
</DockPanel>
|
|
|
|
|
|
|
|
|
|
</Window>
|