<Window x:Class="SubCabinetSolution.Views.CabinetWindow" 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" Title="高值耗材柜(科室)" MinWidth="600" MinHeight="500" Background="White" ResizeMode="CanResize" WindowStartupLocation="CenterScreen" WindowState="Maximized" WindowStyle="None" mc:Ignorable="d"> <Window.Resources> <Style x:Key="UserDefineButtonStyle" TargetType="Button"> <Setter Property="Width" Value="60" /> <Setter Property="Height" Value="30" /> <Setter Property="Margin" Value="10,0" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Button"> <Border Name="ButtonBorder" Background="#D9E3ED" BorderBrush="White" BorderThickness="0" CornerRadius="5" TextBlock.Foreground="White"> <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" /> </Border> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter TargetName="ButtonBorder" Property="Background" Value="#CCD9E3ED" /> </Trigger> <Trigger Property="IsPressed" Value="True"> <Setter TargetName="ButtonBorder" Property="Opacity" Value="0.6" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="UserDefineBorderStyle" TargetType="Border"> <Setter Property="Width" Value="80" /> <Setter Property="Height" Value="80" /> <Setter Property="Background" Value="#4381DF" /> <Setter Property="BorderThickness" Value="0" /> <Setter Property="CornerRadius" Value="5" /> </Style> </Window.Resources> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*" /> <ColumnDefinition Width="5*" /> </Grid.ColumnDefinitions> <Border Grid.Column="0" Background="White"> <Border.Effect> <DropShadowEffect BlurRadius="10" Opacity="0.5" Color="#E8F2FB" /> </Border.Effect> <Grid ShowGridLines="True"> <Grid.RowDefinitions> <RowDefinition Height="60" /> <RowDefinition /> <RowDefinition Height="160" /> <RowDefinition Height="60" /> </Grid.RowDefinitions> <TextBlock Grid.Row="0" Padding="0,20" Background="#4381DF" FontSize="18" FontWeight="Bold" Foreground="White" Text="航天203所" TextAlignment="Center" /> <ListBox Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" ItemsSource="{Binding FunctionModelList}"> <ListBox.Template> <ControlTemplate TargetType="{x:Type ListBox}"> <WrapPanel IsItemsHost="True" Orientation="Horizontal" /> </ControlTemplate> </ListBox.Template> <ListBox.ItemTemplate> <DataTemplate> <Border Style="{StaticResource UserDefineBorderStyle}"> <StackPanel VerticalAlignment="Bottom"> <Image Width="40" Height="40" Source="{Binding Image}" /> <TextBlock Margin="0,5" FontFamily="微软雅黑" FontSize="14" Text="{Binding Title}" TextAlignment="Center" /> </StackPanel> </Border> </DataTemplate> </ListBox.ItemTemplate> <ListBox.ItemContainerStyle> <Style TargetType="ListBoxItem"> <Setter Property="OverridesDefaultStyle" Value="True" /> <Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="HorizontalContentAlignment" Value="Center" /> <Setter Property="FontSize" Value="14" /> <Setter Property="Width" Value="100" /> <Setter Property="Height" Value="90" /> <Setter Property="Margin" Value="0,5" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ListBoxItem}"> <Border x:Name="ListBoxItemBorder" Margin="10,0" TextBlock.Foreground="White"> <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" /> </Border> <ControlTemplate.Triggers> <Trigger Property="IsSelected" Value="True"> <Setter TargetName="ListBoxItemBorder" Property="BorderBrush" Value="#00E3C7" /> <Setter TargetName="ListBoxItemBorder" Property="BorderThickness" Value="0,0,0,3" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> </ListBox.ItemContainerStyle> </ListBox> <ListBox Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" ItemsSource="{Binding SettingsModelList}"> <ListBox.ItemsPanel> <ItemsPanelTemplate> <WrapPanel IsItemsHost="True" Orientation="Horizontal" /> </ItemsPanelTemplate> </ListBox.ItemsPanel> <ListBox.ItemTemplate> <DataTemplate> <StackPanel> <Image Width="32" Height="32" Source="{Binding Image}" /> <TextBlock Margin="0,10" FontFamily="微软雅黑" Text="{Binding Title}" TextAlignment="Center" /> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> <ListBox.ItemContainerStyle> <Style TargetType="ListBoxItem"> <Setter Property="OverridesDefaultStyle" Value="True" /> <Setter Property="HorizontalContentAlignment" Value="Center" /> <Setter Property="Foreground" Value="#4381DF" /> <Setter Property="FontSize" Value="12" /> <Setter Property="Width" Value="65" /> <Setter Property="Height" Value="65" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ListBoxItem}"> <Border x:Name="ListBoxItemBorder" CornerRadius="5"> <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" /> </Border> <ControlTemplate.Triggers> <Trigger Property="IsSelected" Value="true"> <Setter TargetName="ListBoxItemBorder" Property="Background" Value="#CCD9E3ED" /> </Trigger> <Trigger Property="IsMouseOver" Value="True"> <Setter TargetName="ListBoxItemBorder" Property="Opacity" Value="0.6" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> </ListBox.ItemContainerStyle> </ListBox> <TextBlock Grid.Row="3" Padding="0,20" Background="#4381DF" FontSize="18" FontWeight="Bold" Foreground="White" Text="航天203所" TextAlignment="Center" /> </Grid> </Border> <DockPanel Grid.Column="1"> <Border Height="50" Background="White" DockPanel.Dock="Top"> <Border.Effect> <DropShadowEffect BlurRadius="10" Opacity="0.5" Color="#E8F2FB" /> </Border.Effect> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="180" /> <ColumnDefinition /> <ColumnDefinition Width="180" /> </Grid.ColumnDefinitions> <StackPanel Grid.Column="0" Orientation="Horizontal"> <Image Width="32" Height="32" Margin="10,0,0,0" Source="/Images/人脸识别.png" /> <Image Width="24" Height="24" Margin="5,0" Source="/Images/right.png" /> <TextBlock VerticalAlignment="Center" FontSize="18" Foreground="#7D97AE" Text="主页" TextAlignment="Center" /> </StackPanel> <StackPanel Grid.Column="1" HorizontalAlignment="Center" Orientation="Horizontal"> <TextBox Width="300" Height="30" Padding="3,0" VerticalContentAlignment="Center"> <TextBox.Resources> <VisualBrush x:Key="PlaceholderBrush" AlignmentX="Left" Opacity="0.3" Stretch="None" TileMode="None"> <VisualBrush.Visual> <TextBlock Text="请输入关键字" /> </VisualBrush.Visual> </VisualBrush> <Style TargetType="{x:Type Border}"> <Setter Property="CornerRadius" Value="3" /> <Setter Property="BorderBrush" Value="LightGray" /> </Style> </TextBox.Resources> <TextBox.Style> <Style TargetType="TextBox"> <Style.Triggers> <Trigger Property="Text" Value="{x:Null}"> <Setter Property="Background" Value="{StaticResource PlaceholderBrush}" /> </Trigger> <Trigger Property="Text" Value=""> <Setter Property="Background" Value="{StaticResource PlaceholderBrush}" /> </Trigger> <Trigger Property="IsKeyboardFocused" Value="True"> <Setter Property="Background" Value="White" /> </Trigger> </Style.Triggers> </Style> </TextBox.Style> </TextBox> <Button Style="{StaticResource UserDefineButtonStyle}"> <StackPanel Orientation="Horizontal"> <Image Width="24" Height="24" Source="/Images/search.png" /> </StackPanel> </Button> </StackPanel> <DockPanel Grid.Column="2" LastChildFill="False"> <StackPanel VerticalAlignment="Center" DockPanel.Dock="Left" Orientation="Vertical"> <DockPanel Width="120" LastChildFill="True"> <TextBlock DockPanel.Dock="Left" FontSize="18" Foreground="#7D97AE" Text="21146" /> <TextBlock Padding="0,5,2,0" Foreground="#7D97AE" Text="手术室" TextAlignment="Right" /> </DockPanel> <TextBlock Width="120" Foreground="#7D97AE" Text="{Binding CurrentTime}" /> </StackPanel> <Button Width="50" Height="50" Background="Transparent" BorderBrush="{x:Null}" Command="{Binding LoginOutCommand}" CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" DockPanel.Dock="Right"> <StackPanel> <Image Width="24" Height="24" Source="/Images/人脸识别.png" /> <TextBlock Margin="0,3" FontSize="10" Foreground="#7D97AE" Text="退出" TextAlignment="Center" /> </StackPanel> </Button> </DockPanel> </Grid> </Border> <Grid DockPanel.Dock="Bottom" /> </DockPanel> </Grid> </Window>