<Window xmlns:hc="https://handyorg.github.io/handycontrol"  x:Class="电子展板.MainWindow2"
        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"
        x:Name="window"
        mc:Ignorable="d"
        Title="MainWindow"   Background="#E5E5E5">
    <Window.DataContext>
        <vm:MainWindow2ViewModel/>
    </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="50"/>
                        <RowDefinition Height="70"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="50"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="460"/>
                        <ColumnDefinition Width="50"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Text="危险点"  Grid.Row="1"  Grid.Column="1" FontSize="60" Foreground="#1F7572" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,0,0,0"/>
                    <TextBlock Text="重点管控措施"  Grid.Row="1"  Grid.Column="2" FontSize="60" Foreground="#1F7572" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,0,0,0"/>
                    <TextBlock Text="党员亮身份"  Grid.Row="1"  Grid.Column="3" FontSize="60" Foreground="#1F7572" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,0,0,0"/>

                    <Border  Grid.Row="2" Grid.Column="1"   Background="#C0E3D9" CornerRadius="20"  Margin="0,20,20,50">
                        <TextBlock Margin="10" HorizontalAlignment="Left"  VerticalAlignment="Top" FontSize="{Binding Config.DangerPointSize}" Foreground="Black" TextWrapping="Wrap" Text="{Binding Config.DangerPoint}"/>
                    </Border>
                    <Border  Grid.Row="2" Grid.Column="2"  Background="#C0E3D9" CornerRadius="20"  Margin="25,20,20,50">
                        <TextBlock Margin="10" HorizontalAlignment="Left"  VerticalAlignment="Top" FontSize="{Binding Config.MeasuresSize}" Foreground="Black" TextWrapping="Wrap" Text="{Binding Config.Measures}"/>
                    </Border>
                    <Grid Grid.Row="2" Grid.Column="3"  Margin="20,20,0,50">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Border Grid.Row="0" Grid.Column="0"  Background="#C0E3D9" CornerRadius="20"  Margin="10,0,5,5">
                            <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 Grid.Row="0" Grid.Column="1"  Background="#C0E3D9" CornerRadius="20" Margin="5,0,10,5">
                            <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 Grid.Row="1" Grid.Column="0"  Background="#C0E3D9" CornerRadius="20" Margin="10,5,5,0">
                            <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 Grid.Row="1" Grid.Column="1"  Background="#C0E3D9" CornerRadius="20" Margin="5,5,10,0">
                            <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>


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