兼容win7版应用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
4.1 KiB

<UserControl x:Class="AIK.Views.MenuPages.RemoteControlDetector.RemoteControlDetectorPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:AIK.Views.MenuPages.RemoteControlDetector"
xmlns:common="clr-namespace:AIK.Views.MenuPages.CommonPage"
mc:Ignorable="d"
d:DesignHeight="800" d:DesignWidth="800">
<UserControl.Resources>
<!-- 可选:定义按钮样式(推荐) -->
<Style x:Key="PrimaryButtonStyle" TargetType="Button">
<Setter Property="Background" Value="#42A5F5"/>
<!-- 更淡的蓝 -->
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Padding" Value="24,12"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
CornerRadius="6"
Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#1E88E5"/>
<!-- 悬停用稍深一点的 Blue 600 -->
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="#1976D2"/>
<!-- 按下回到你的标题色 -->
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="#B0BEC5"/>
</Trigger>
</Style.Triggers>
</Style>
</UserControl.Resources>
<!-- 仪表盘 -->
<Grid Margin="10,10,20,10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 标题 -->
<TextBlock Grid.Row="0" Text="{DynamicResource RemoteDetection}"
Foreground="#1976D2"
FontSize="32"
FontWeight="Bold"
HorizontalAlignment="Center"
Margin="0,0,0,40"
TextAlignment="Center"/>
<!-- 提示语区域 -->
<Border Grid.Row="1"
Background="#F5F7F9"
BorderBrush="#E0E0E0"
BorderThickness="1"
CornerRadius="8"
Padding="20,15"
Margin="0,0,0,30">
<StackPanel>
<TextBlock Style="{StaticResource HintTitleStyle}"
Text="{DynamicResource RemoteDetection}"/>
<TextBlock Style="{StaticResource HintContentStyle}"
Text="{DynamicResource RemoteDetectionTips}"/>
</StackPanel>
</Border>
<common:SemiCircleGauge HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Row="2" DataContext="{Binding SemiCircleGaugeVM}"/>
<!-- 检测按钮 -->
<Button Grid.Row="3"
Content="{DynamicResource Detection}"
Style="{StaticResource PrimaryButtonStyle}"
Margin="0,30,0,0"/>
</Grid>
</UserControl>