<Window xmlns:hc="https://handyorg.github.io/handycontrol"  
        x:Class="电子展板.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:i="http://schemas.microsoft.com/xaml/behaviors" 
        xmlns:local="clr-namespace:电子展板"
        xmlns:vm="clr-namespace:电子展板.ViewModels"
        ResizeMode="NoResize"
        WindowStyle="None"
        mc:Ignorable="d"
        x:Name="window"
        Title="MainWindow"   Background="#E5E5E5">
    <Window.DataContext>
        <vm:MainWindowViewModel/>
    </Window.DataContext>
    <i:Interaction.Triggers>
        <i:EventTrigger EventName="Loaded">
            <i:InvokeCommandAction Command="{Binding LoadedCommand}"  CommandParameter="{Binding ElementName=window}"/>
        </i:EventTrigger>
        <i:EventTrigger EventName="Closing">
            <i:InvokeCommandAction Command="{Binding WindowClosingCommand}"  PassEventArgsToCommand="True"/>
        </i:EventTrigger>
    </i:Interaction.Triggers>
    <Grid>
        <Viewbox Stretch="Uniform"  >
            <Canvas Width="1920" Height="1080">
                <Grid Width="1920" Height="1080">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="80"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid Grid.Row="1">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="140"/>
                            <RowDefinition Height="80"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="50"/>
                            <ColumnDefinition Width="6*"/>
                            <ColumnDefinition Width="8*"/>
                            <ColumnDefinition Width="6*"/>
                            <ColumnDefinition Width="50"/>
                        </Grid.ColumnDefinitions>
                        <Grid Grid.Row="0"  Grid.Column="1">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="180"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>
                                <TextBlock Text="时间："  Grid.Column="0" FontSize="60" Foreground="#1F7572" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,0,0,0"/>
                                <Border   Grid.Column="1"  Background="#C0E3D9" CornerRadius="20" Height="140">
                                    <TextBlock HorizontalAlignment="Center"  VerticalAlignment="Center" FontSize="{Binding Config.TimeSize}" Foreground="Black" TextWrapping="Wrap" Text="{Binding Config.Time}"/>
                                </Border>
                            </Grid>
                        </Grid>
                        <Grid Grid.Row="0"  Grid.Column="2" Margin="40,0,0,0">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="240"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>
                                <TextBlock Text="负责人："  Grid.Column="0" FontSize="60" Foreground="#1F7572" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,0,0,0"/>
                                <Border   Grid.Column="1"  Background="#C0E3D9" CornerRadius="20" Height="140">
                                    <TextBlock HorizontalAlignment="Center"  VerticalAlignment="Center" FontSize="{Binding Config.ChargerSize}" Foreground="Black" TextWrapping="Wrap" Text="{Binding Config.Charger}"/>
                                </Border>
                            </Grid>
                        </Grid>
                        <Grid Grid.Row="0"  Grid.Column="3" Margin="40,0,0,0">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="270"/>
                                    <ColumnDefinition Width="*"/>
                                </Grid.ColumnDefinitions>
                                <TextBlock Text="风险等级："  Grid.Column="0" FontSize="60" Foreground="#1F7572" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,0,0,0"/>
                                <Border   Grid.Column="1"  Background="#C0E3D9" CornerRadius="20" Height="140">
                                    <TextBlock HorizontalAlignment="Center"  VerticalAlignment="Center" FontSize="{Binding Config.RiskLevelSize}" Foreground="Black" TextWrapping="Wrap" Text="{Binding Config.RiskLevel}"/>
                                </Border>
                            </Grid>
                        </Grid>
                        <TextBlock  Grid.Row="1"  Grid.Column="1" Text="工作内容："  FontSize="60" Foreground="#1F7572" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,0,0,0"/>
                        <Border  Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="3"  Background="#C0E3D9" CornerRadius="20"  Margin="0,40,0,40">
                            <TextBlock HorizontalAlignment="Left" Margin="10"  VerticalAlignment="Top" FontSize="{Binding Config.ContentSize}" Foreground="Black" TextWrapping="Wrap" Text="{Binding Config.Content}"/>
                        </Border>
                    </Grid>

                </Grid>



            </Canvas>
        </Viewbox>
    </Grid>
</Window>
