<Window x:Class="ShanghaiEnvironmentalTechnology.Main"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="{DynamicResource WindowTitle}" 
      WindowState="Maximized"   Height="768" Width="1024" Loaded="Window_Loaded" WindowStartupLocation="CenterScreen">





    <Window.Resources>
        <Style x:Key="ControlCombStyle" TargetType="ComboBox">
            <Setter Property="Background" Value="#FF4A86E8"/>
            <Setter Property="Foreground" Value="Orange"  />
            <Setter Property="FontSize" Value="16"/>
            <Setter Property="FontWeight" Value="SemiBold"/>
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="Height" Value="32"/>
            <Setter Property="Width" Value="100"/>
            <Setter Property="Margin" Value="4"/>
        </Style>
        <Style x:Key="ControlCombItemStyle" TargetType="ComboBoxItem">
            <Setter Property="Background" Value="#FF4A86E8"/>
            <Setter Property="Foreground" Value="White"/>
            <Setter Property="FontSize" Value="16"/>
            <Setter Property="FontWeight" Value="SemiBold"/>
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="Height" Value="32"/>
            <Setter Property="Width" Value="80"/>
            <Setter Property="Margin" Value="4"/>
        </Style>
    </Window.Resources>
    <Grid>
        <!-- 右上角语言选择下拉框 -->
        <ComboBox Name="cmbMaterial" 
                  HorizontalAlignment="Right" 
                  VerticalAlignment="Top" 
                  Margin="10,10,10,0"
                  Width="100"
                  Style="{StaticResource ControlCombStyle}" 
                  SelectionChanged="cmbMaterial_SelectionChanged">
            <ComboBoxItem Style="{StaticResource ControlCombItemStyle}">中文</ComboBoxItem>
            <ComboBoxItem Style="{StaticResource ControlCombItemStyle}">English</ComboBoxItem>
        </ComboBox>

        <!-- 标题文本（带呼吸动画） -->
        <TextBlock x:Name="BreathingText"
                   Text="{DynamicResource WindowTitle}" 
                   FontSize="24" 
                   FontWeight="Bold" 
                   HorizontalAlignment="Center" 
                   VerticalAlignment="Center" 
                   Margin="0, -50, 0, 0" 
                   Foreground="Black" 
                   TextAlignment="Center">
            <TextBlock.RenderTransform>
                <ScaleTransform x:Name="textScale" ScaleX="1" ScaleY="1"/>
            </TextBlock.RenderTransform>
        </TextBlock>

        <!-- 底部进入按钮 -->
        <Button Content="{DynamicResource Deformation7}" 
                Width="100" 
                Height="40" 
                HorizontalAlignment="Center" 
                VerticalAlignment="Bottom" 
                Margin="0,0,0,30" 
                Style="{StaticResource MyButtonStyle}"
                Click="Button_Click"/>
    </Grid>

    <!-- 窗口加载时启动标题缩放动画（呼吸效果） -->
    <Window.Triggers>
        <EventTrigger RoutedEvent="Window.Loaded">
            <BeginStoryboard>
                <Storyboard RepeatBehavior="Forever">
                    <DoubleAnimation Storyboard.TargetName="textScale"
                                     Storyboard.TargetProperty="ScaleX"
                                     From="1" To="1.2" Duration="0:0:1" 
                                     AutoReverse="True"/>
                    <DoubleAnimation Storyboard.TargetName="textScale"
                                     Storyboard.TargetProperty="ScaleY"
                                     From="1" To="1.2" Duration="0:0:1" 
                                     AutoReverse="True"/>
                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>
    </Window.Triggers>
</Window>