<Window x:Class="Aucma.Core.Palletiz.Views.MainWindow" 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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" Background="#ffffff" Title="澳柯玛生产控制系统" MinHeight="700" MinWidth="1300" WindowState="Maximized" WindowStartupLocation="CenterScreen" > <Border CornerRadius="5" > <Border.Effect> <DropShadowEffect Color="Gray" ShadowDepth="0" BlurRadius="5" Opacity="0.3" Direction="0"></DropShadowEffect> </Border.Effect> <Grid> <Grid.RowDefinitions> <RowDefinition Height="auto"/> <RowDefinition Height="6*"/> <RowDefinition Height="auto"/> </Grid.RowDefinitions> <DockPanel Grid.Row="0"> <materialDesign:ColorZone Padding="15 10 0 0" materialDesign:ElevationAssist.Elevation="Dp4" DockPanel.Dock="Top" Mode="PrimaryMid"> <DockPanel Height="60" > <Image Height="46" VerticalAlignment="Top" Source="/Assets/Images/Newlog.png" /> <StackPanel Height="50" Margin="15 0 0 0" > <StackPanel Orientation="Horizontal" > <TextBlock Text="澳柯玛生产控制系统" Foreground="White" FontSize="30" HorizontalAlignment="Center" VerticalAlignment="Center" /> </StackPanel> </StackPanel> <!--右侧信息--> <DockPanel HorizontalAlignment="Right" VerticalAlignment="Stretch"> <TextBlock x:Name="TestTB" Text="白班" VerticalAlignment="Center" Foreground="White" FontSize="15" Margin="10,0"/> <TextBlock Text="|" VerticalAlignment="Center" Foreground="White" FontSize="15" Margin="10,0"/> <TextBlock x:Name="loginUser" Text="李四" VerticalAlignment="Center" Foreground="White" FontSize="15" Margin="10,0"/> </DockPanel> </DockPanel> </materialDesign:ColorZone> </DockPanel> <DockPanel Grid.Row="1"> <!--<ScrollViewer x:Name="MainScrollViewer" materialDesign:ScrollViewerAssist.IsAutoHideEnabled="True">--> <ContentControl Content="{Binding UserContent}" Height="auto" /> <!--</ScrollViewer>--> </DockPanel> <DockPanel Grid.Row="2" Margin="5 0 5 3"> <Border BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" HorizontalAlignment="Stretch" VerticalAlignment="Bottom"> <Grid> <Grid.RowDefinitions> <RowDefinition/> <RowDefinition/> </Grid.RowDefinitions> <StackPanel Grid.Row="1" Height="50" Orientation="Horizontal" Margin="5 0" HorizontalAlignment="Left"> <Button Content="实时监控" x:Name="FirstPage" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=FirstPage}" Margin="5 0" /> <Button Content="扫描记录" x:Name="RecordPage" Margin="5 0" Command="{Binding SwitchPagesCommand}" CommandParameter="{Binding Name,ElementName=RecordPage}" /> <Button Content="键盘" x:Name="TabTip" Margin="5 0" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=TabTip}" /> <Button Content="最小化" x:Name="Minimized" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Minimized}" Width="100" Height="30" Background="#FF9900" BorderBrush="#FF9900" Margin="0,0,10,0"/> <Button Content="退 出" x:Name="Exit" Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Exit}" Width="100" Height="30" Background="#FF0033" BorderBrush="#FF0033" Margin="0,0,10,0"/> </StackPanel> <StackPanel Grid.Row="2" Height="50" Orientation="Horizontal" HorizontalAlignment="Right"> <Border Width="30" Height="30" CornerRadius="15"> <Border.Background> <ImageBrush x:Name="PlcStatus" ImageSource="/Assets/Images/Green.png"/> </Border.Background> </Border> <TextBlock x:Name="PLCState" Text="PLC连接成功" VerticalAlignment="Center" Foreground="Green" FontSize="15" Margin="10,0"/> <Border Width="30" Height="30" CornerRadius="15"> <Border.Background> <ImageBrush x:Name="PlcStatusImage" ImageSource="/Assets/Images/Green.png"/> </Border.Background> </Border> <TextBlock x:Name="DB" Text="数据库连接成功" VerticalAlignment="Center" Foreground="Green" FontSize="15" Margin="10,0"/> <Border Width="30" Height="30" CornerRadius="15"> <Border.Background> <ImageBrush x:Name="BarCodeStatus" ImageSource="/Assets/Images/Green.png"/> </Border.Background> </Border> <TextBlock x:Name="BarCodeStatusTxt" Text="扫描器连接成功" VerticalAlignment="Center" Foreground="Green" FontSize="15" Margin="10,0"/> </StackPanel> </Grid> </Border> </DockPanel> </Grid> </Border> </Window>