<Window x:Class="SlnMesnac.WPF.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:local="clr-namespace:SlnMesnac.WPF"
        mc:Ignorable="d"
        Title="MainWindow" Height="1080" Width="1920"
        WindowState="Maximized" WindowStyle="None" ResizeMode="NoResize" Topmost="False" Background="#E0E9F2">
    <!--<Window.Background>
        <ImageBrush ImageSource="/Templates/image/background.jpg" />
    </Window.Background>-->

    <Border Margin="5" Background="Transparent" CornerRadius="10">
        <Border.Effect>
            <DropShadowEffect Color="Gray" ShadowDepth="0" BlurRadius="5" Opacity="0.3" Direction="0"></DropShadowEffect>
        </Border.Effect>

        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="0.6*"/>
                <RowDefinition Height="7*"/>
                <RowDefinition Height="0.5*"/>
            </Grid.RowDefinitions>
            <Border Grid.Row="0" BorderBrush="Red" BorderThickness="0" CornerRadius="5" Background="#EBF4FD" Margin="10,0">
                
                <TextBlock Text="RFID+ATR+OCR 中间件监控系统" FontSize="35" Foreground="#31446E" FontWeight="Bold" Margin="20,0,0,0" VerticalAlignment="Center"/>

            </Border>
            <Border Grid.Row="1" BorderBrush="Red" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="0,10">
                <ContentControl Content="{Binding UserContent}"/>
            </Border>
            <Border Grid.Row="2" Background="Transparent" Margin="6,2,6,0">
                
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="2*"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.Column="0" VerticalAlignment="Center"  HorizontalAlignment="Left" Orientation="Horizontal">
                        <Button Content="首  页" x:Name="Index"  Command="{Binding ControlOnClickCommand}" CommandParameter="{Binding Name,ElementName=Index}" Style="{StaticResource  BUTTON_AGREE}"  Width="100" Height="30" Background="#5095F3" BorderBrush="#5095F3" Margin="10,0,10,0"/>
                        <Button Content="数据记录" x:Name="History"  Command="{Binding ControlOnClickCommand}" CommandParameter="{Binding Name,ElementName=History}" Style="{StaticResource  BUTTON_AGREE}"  Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0"/>
                        <Button Content="日志信息" x:Name="LogInfo" Command="{Binding ControlOnClickCommand}" CommandParameter="{Binding Name,ElementName=LogInfo}" Style="{StaticResource  BUTTON_AGREE}"  Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0"/>
                        <Button Content="系统版本" x:Name="Version"  Command="{Binding ControlOnClickCommand}" CommandParameter="{Binding Name,ElementName=Version}" Style="{StaticResource  BUTTON_AGREE}"  Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0"/>
                        <Button Content="键  盘"  Command="{Binding OpenSystemKeyboardCommand}" Style="{StaticResource  BUTTON_AGREE}"  Width="100" Height="30" Background="#009999" BorderBrush="#FF36B5C1" Margin="0,0,10,0"/>
                        <Button Content="最小化" x:Name="Minimized"  Command="{Binding FormControlCommand}" CommandParameter="{Binding Name,ElementName=Minimized}" Style="{StaticResource  BUTTON_AGREE}"  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}" Style="{StaticResource  BUTTON_AGREE}"  Width="100" Height="30" Background="#FF0033" BorderBrush="#FF0033" Margin="0,0,10,0"/>
                    </StackPanel>

                    <StackPanel Grid.Column="1" VerticalAlignment="Center"  HorizontalAlignment="Right" Orientation="Horizontal">
                        
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>

                            <StackPanel Grid.Column="0">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="*"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <StackPanel Grid.Column="0">
                                        <Ellipse Width="30" Height="30">
                                            <Ellipse.Style>
                                                <Style TargetType="Ellipse">
                                                    <Style.Triggers>
                                                        <DataTrigger Binding="{Binding RfidStatus}" Value="0">
                                                            <Setter Property="Shape.Fill" Value="Orange"/>
                                                        </DataTrigger>
                                                        <DataTrigger Binding="{Binding RfidStatus}" Value="1">
                                                            <Setter Property="Shape.Fill" Value="Green"/>
                                                        </DataTrigger>
                                                        <DataTrigger Binding="{Binding RfidStatus}" Value="2">
                                                            <Setter Property="Shape.Fill" Value="Red"/>
                                                        </DataTrigger>
                                                    </Style.Triggers>
                                                </Style>
                                            </Ellipse.Style>
                                        </Ellipse>
                                    </StackPanel>
                                    <StackPanel Grid.Column="1"  VerticalAlignment="Center">
                                        <TextBlock Text="RFID状态" FontSize="15" Foreground="#31446E" Margin="2,0,10,0"/>
                                    </StackPanel>
                                </Grid>
                            </StackPanel>

                            <StackPanel Grid.Column="1">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="*"/>
                                        <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <StackPanel Grid.Column="0">
                                        <Ellipse Width="30" Height="30">
                                            <Ellipse.Style>
                                                <Style TargetType="Ellipse">
                                                    <Style.Triggers>
                                                        <DataTrigger Binding="{Binding CamStatus}" Value="0">
                                                            <Setter Property="Shape.Fill" Value="Orange"/>
                                                        </DataTrigger>
                                                        <DataTrigger Binding="{Binding CamStatus}" Value="1">
                                                            <Setter Property="Shape.Fill" Value="Green"/>
                                                        </DataTrigger>
                                                        <DataTrigger Binding="{Binding CamStatus}" Value="2">
                                                            <Setter Property="Shape.Fill" Value="Red"/>
                                                        </DataTrigger>
                                                    </Style.Triggers>
                                                </Style>
                                            </Ellipse.Style>
                                        </Ellipse>
                                    </StackPanel>
                                    <StackPanel Grid.Column="1"  VerticalAlignment="Center">
                                        <TextBlock Text="相机状态" FontSize="15" Foreground="#31446E" Margin="2,0,10,0"/>
                                    </StackPanel>
                                </Grid>
                            </StackPanel>

                        </Grid>

                    </StackPanel>
                </Grid>


            </Border>
        </Grid>
    </Border>

</Window>
