<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"
        WindowState="Maximized"
        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">
                    <TextBlock Text="时间："   FontSize="50" Foreground="#1F7572" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="95,18,0,0"/>
                    <Border  Background="#C0E3D9" CornerRadius="20" Height="80" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="250,12,0,0" Width="277">
                        <TextBlock HorizontalAlignment="Center"  VerticalAlignment="Center" FontSize="{Binding Config.TimeSize}" Foreground="Black" TextWrapping="Wrap" Text="{Binding Config.Time}"/>
                    </Border>

                    <TextBlock Text="负责人："   FontSize="50" Foreground="#1F7572" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="718,18,0,0"/>
                    <Border  Background="#C0E3D9" CornerRadius="20" Height="80"  VerticalAlignment="Top" HorizontalAlignment="Left" Margin="925,10,0,0" Width="263">
                        <TextBlock HorizontalAlignment="Center"  VerticalAlignment="Center" FontSize="{Binding Config.ChargerSize}" Foreground="Black" TextWrapping="Wrap" Text="{Binding Config.Charger}" />
                    </Border>

                    <TextBlock Text="风险等级："   FontSize="50" Foreground="#1F7572" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="1335,18,0,0"/>
                    <Border    Background="#C0E3D9" CornerRadius="20" Height="85" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="1620,7,0,0" Width="240">
                        <TextBlock HorizontalAlignment="Center"  VerticalAlignment="Center" FontSize="{Binding Config.RiskLevelSize}" Foreground="Black" TextWrapping="Wrap" Text="{Binding Config.RiskLevel}"/>
                    </Border>
                    <TextBlock   Text="工作内容"  FontSize="50" Foreground="#1F7572" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="145,116,0,0"/>
                    <Border   Background="#C0E3D9" CornerRadius="20" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="35,205,0,0" Width="485" Height="820" >
                        <TextBlock HorizontalAlignment="Left" Margin="10"  VerticalAlignment="Top" FontSize="{Binding Config.ContentSize}" Foreground="Black" TextWrapping="Wrap" Text="{Binding Config.Content}"/>
                    </Border>

                    <TextBlock Text="危险点"   FontSize="50" Foreground="#1F7572" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="636,116,0,0" Height="65" Width="164"/>
                    <Border    Background="#C0E3D9" CornerRadius="20" VerticalAlignment="Top" HorizontalAlignment="Left"  Margin="541,205,0,0" Height="820" Width="394">
                        <TextBlock Margin="10" HorizontalAlignment="Left"  VerticalAlignment="Top" FontSize="{Binding Config.DangerPointSize}" Foreground="Black" TextWrapping="Wrap" Text="{Binding Config.DangerPoint}"/>
                    </Border>
                    <TextBlock Text="重点管控措施"   FontSize="50" Foreground="#1F7572" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="1005,130,0,0" Height="65" Width="339"/>
                    <Border    Background="#C0E3D9" CornerRadius="20" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="960,205,0,0" Height="820" Width="455">
                        <TextBlock Margin="10" HorizontalAlignment="Left"  VerticalAlignment="Top" FontSize="{Binding Config.MeasuresSize}" Foreground="Black" TextWrapping="Wrap" Text="{Binding Config.Measures}"/>
                    </Border>

                    <TextBlock Text="党员亮身份"    FontSize="50" Foreground="#1F7572" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="1540,130,0,0" Height="65" Width="320"/>

                    <Border    Background="#C0E3D9" CornerRadius="20" VerticalAlignment="Top" HorizontalAlignment="Left"  Margin="1452,205,0,0" Height="385" Width="223">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="80"/>
                            </Grid.RowDefinitions>
                            <Image Margin="10" Source="{Binding Image1}" Stretch="Uniform" />
                            <TextBlock Text="{Binding Config.CPCMember1Name}"  Grid.Row="1"  FontSize="{Binding Config.CPCMemberSize}" Foreground="Black" TextWrapping="Wrap" TextAlignment="Center"/>
                        </Grid>
                    </Border>
                    <Border    Background="#C0E3D9" CornerRadius="20" VerticalAlignment="Top" HorizontalAlignment="Left"  Margin="1687,205,0,0" Height="385" Width="223">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="80"/>
                            </Grid.RowDefinitions>
                            <Image Margin="10" Source="{Binding Image2}" Stretch="Uniform" />
                            <TextBlock Text="{Binding Config.CPCMember2Name}"  Grid.Row="1"  FontSize="{Binding Config.CPCMemberSize}" Foreground="Black" TextWrapping="Wrap" TextAlignment="Center"/>
                        </Grid>
                    </Border>




                    <Border    Background="#C0E3D9" CornerRadius="20" VerticalAlignment="Top" HorizontalAlignment="Left"  Margin="1452,635,0,0" Height="385" Width="223">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="80"/>
                            </Grid.RowDefinitions>
                            <Image Margin="10" Source="{Binding Image3}" Stretch="Uniform" />
                            <TextBlock Text="{Binding Config.CPCMember3Name}"  Grid.Row="1"  FontSize="{Binding Config.CPCMemberSize}" Foreground="Black" TextWrapping="Wrap" TextAlignment="Center"/>
                        </Grid>
                    </Border>
                    <Border    Background="#C0E3D9" CornerRadius="20" VerticalAlignment="Top" HorizontalAlignment="Left"  Margin="1687,635,0,0" Height="385" Width="223">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="80"/>
                            </Grid.RowDefinitions>
                            <Image Margin="10" Source="{Binding Image4}" Stretch="Uniform" />
                            <TextBlock Text="{Binding Config.CPCMember4Name}"  Grid.Row="1"  FontSize="{Binding Config.CPCMemberSize}" Foreground="Black" TextWrapping="Wrap" TextAlignment="Center"/>
                        </Grid>
                    </Border>

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