Files
Sleep-Multi-functionality/Main.xaml

52 lines
2.1 KiB
Plaintext
Raw Normal View History

2026-05-04 14:46:58 +08:00
<Window x:Class="ShanghaiEnvironmentalTechnology.Main"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="睡眠呼吸暂停治疗面桌多功能测试仪"
Height="768" Width="1024" Loaded="Window_Loaded" WindowStartupLocation="CenterScreen"
>
<!-- 背景色 -->
<Grid>
<TextBlock x:Name="BreathingText"
Text="睡眠呼吸暂停治疗面桌多功能测试仪"
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="进入"
Width="100"
Height="40"
HorizontalAlignment="Center"
VerticalAlignment="Bottom"
Margin="0,0,0,30"
Style="{StaticResource MyButtonStyle}"
Click="Button_Click"/>
<!-- 设置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>