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.
311 lines
16 KiB
311 lines
16 KiB
<Border x:Class="SparkClient.Views.BaseWindow.HomeWindow" |
|
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:hc="https://handyorg.github.io/handycontrol" |
|
xmlns:local="clr-namespace:SparkClient.Views.BaseWindow" |
|
xmlns:baseWindow="clr-namespace:SparkClient.ViewModel.BaseWindow" |
|
mc:Ignorable="d" |
|
Loaded="HomeWindow_OnLoaded" |
|
> |
|
<!-- Height="450" Width="800" --> |
|
<Border.Resources> |
|
<!-- 定义一个缩放变换,用于按钮的放大缩小 --> |
|
<ScaleTransform x:Key="ButtonScaleTransform" ScaleX="1" ScaleY="1" x:Shared="False" /> |
|
|
|
<!-- 鼠标移入的放大动画 --> |
|
<Storyboard x:Key="MouseEnterStoryboard"> |
|
<!-- 放大ScaleX --> |
|
<DoubleAnimation |
|
From="1" To="1.1" |
|
Duration="0:0:0.3" |
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"> |
|
<DoubleAnimation.EasingFunction> |
|
<CubicEase EasingMode="EaseOut"/> |
|
</DoubleAnimation.EasingFunction> |
|
</DoubleAnimation> |
|
<!-- 放大ScaleY --> |
|
<DoubleAnimation |
|
From="1" To="1.1" |
|
Duration="0:0:0.3" |
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"> |
|
<DoubleAnimation.EasingFunction> |
|
<CubicEase EasingMode="EaseOut"/> |
|
</DoubleAnimation.EasingFunction> |
|
</DoubleAnimation> |
|
</Storyboard> |
|
|
|
<!-- 鼠标移出的缩小动画 --> |
|
<Storyboard x:Key="MouseLeaveStoryboard"> |
|
<!-- 缩回ScaleX --> |
|
<DoubleAnimation |
|
From="1.1" To="1" |
|
Duration="0:0:0.3" |
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"> |
|
<DoubleAnimation.EasingFunction> |
|
<CubicEase EasingMode="EaseOut"/> |
|
</DoubleAnimation.EasingFunction> |
|
</DoubleAnimation> |
|
<!-- 缩回ScaleY --> |
|
<DoubleAnimation |
|
From="1.1" To="1" |
|
Duration="0:0:0.3" |
|
Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"> |
|
<DoubleAnimation.EasingFunction> |
|
<CubicEase EasingMode="EaseOut"/> |
|
</DoubleAnimation.EasingFunction> |
|
</DoubleAnimation> |
|
</Storyboard> |
|
|
|
<Style x:Key="CloseHoverImageStyle" TargetType="Image"> |
|
<!-- 默认图片 --> |
|
<Setter Property="Source" Value="pack://application:,,,/Resource/Images/UIResource/01-4.png"/> |
|
|
|
<Style.Triggers> |
|
<!-- DataTrigger: 当父级Border的IsMouseOver=True时,切换图片Source --> |
|
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource AncestorType=Border}}" Value="True"> |
|
<Setter Property="Source" Value="pack://application:,,,/Resource/Images/UIResource/01-4-1.png"/> |
|
</DataTrigger> |
|
</Style.Triggers> |
|
</Style> |
|
<Style x:Key="MiniszieHoverImageStyle" TargetType="Image"> |
|
<!-- 默认图片 --> |
|
<Setter Property="Source" Value="pack://application:,,,/Resource/Images/UIResource/01-3.png"/> |
|
|
|
<Style.Triggers> |
|
<!-- DataTrigger: 当父级Border的IsMouseOver=True时,切换图片Source --> |
|
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource AncestorType=Border}}" Value="True"> |
|
<Setter Property="Source" Value="pack://application:,,,/Resource/Images/UIResource/02-2.png"/> |
|
</DataTrigger> |
|
</Style.Triggers> |
|
</Style> |
|
</Border.Resources> |
|
<Border.Background> |
|
<ImageBrush ImageSource="pack://application:,,,/Resource/Images/UIResource/01-bg.jpg" Stretch="UniformToFill" /> |
|
</Border.Background> |
|
|
|
<Grid> |
|
<Grid.RowDefinitions> |
|
<RowDefinition Height="100"/> |
|
<RowDefinition /> |
|
</Grid.RowDefinitions> |
|
|
|
<Grid Grid.Row="0" Height="100" VerticalAlignment="Top" MouseLeftButtonDown="UIElement_OnMouseLeftButtonDown"> |
|
<!-- 顶部布局 --> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition Width="Auto" /> |
|
<ColumnDefinition Width="Auto" /> |
|
<ColumnDefinition Width="*" /> |
|
</Grid.ColumnDefinitions> |
|
|
|
<Grid Grid.Column="0" Margin="20 0 5 0" Width="100"> |
|
<Grid.RowDefinitions> |
|
<RowDefinition Height="3*"/> |
|
<RowDefinition Height="2*"/> |
|
</Grid.RowDefinitions> |
|
<Image Grid.Row="0" Source="../../Resource/Images/icon_200_t.png" |
|
Width="80" Height="80" |
|
VerticalAlignment="Center" HorizontalAlignment="Center" /> |
|
|
|
<TextBlock Grid.Row="1" Text="{DynamicResource ProcName}" Width="100" |
|
VerticalAlignment="Center" FontWeight="Bold" |
|
HorizontalAlignment="Left" FontSize="28" |
|
TextAlignment="Center"> |
|
<TextBlock.Foreground> |
|
<LinearGradientBrush StartPoint="1,0" EndPoint="1,1"> |
|
<GradientStop Color="#11ceff" Offset="0" /> |
|
<GradientStop Color="#0a699f" Offset="1" /> |
|
</LinearGradientBrush> |
|
</TextBlock.Foreground> |
|
</TextBlock> |
|
</Grid> |
|
<!-- 首位元素:图标 --> |
|
<!-- <Image Grid.Column="0" Source="../../Resource/Images/icon_200.png" --> |
|
<!-- Width="100" Height="100" --> |
|
<!-- VerticalAlignment="Center" HorizontalAlignment="Center" Margin="20 10 5 0" /> --> |
|
|
|
<!-- 次位元素:标题 --> |
|
<!-- <TextBlock Grid.Column="1" Text="{DynamicResource ProcName}" --> |
|
<!-- VerticalAlignment="Center" FontWeight="Bold" --> |
|
<!-- HorizontalAlignment="Left" FontSize="20" > --> |
|
<!-- <TextBlock.Foreground> --> |
|
<!-- <LinearGradientBrush StartPoint="1,0" EndPoint="1,1"> --> |
|
<!-- <GradientStop Color="#11ceff" Offset="0" /> --> |
|
<!-- <GradientStop Color="#0a699f" Offset="1" /> --> |
|
<!-- </LinearGradientBrush> --> |
|
<!-- </TextBlock.Foreground> --> |
|
<!-- </TextBlock> --> |
|
<!-- 末位元素:操作按钮 --> |
|
<Grid Grid.Column="2" Width="260" HorizontalAlignment="Right"> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition Width="*" /> |
|
<ColumnDefinition Width="*" /> |
|
<ColumnDefinition Width="Auto" /> |
|
<ColumnDefinition Width="Auto" /> |
|
</Grid.ColumnDefinitions> |
|
<!-- 最小化 --> |
|
<Button Grid.Column="2" BorderBrush="Transparent" Background="Transparent" |
|
Padding="0" Height="40" BorderThickness="0" FocusVisualStyle="{x:Null}"> |
|
<Border Grid.Column="2" |
|
Width="40" Height="40" |
|
HorizontalAlignment="Center" VerticalAlignment="Center" |
|
Background="Transparent" |
|
|
|
MouseLeftButtonDown="Minimize_Click"> |
|
<Image Style="{StaticResource MiniszieHoverImageStyle}" Height="40"></Image> |
|
</Border> |
|
</Button> |
|
|
|
<!-- 关闭 --> |
|
<Border Grid.Column="3" |
|
Width="40" Height="40" |
|
HorizontalAlignment="Center" VerticalAlignment="Center" |
|
Background="Transparent" |
|
Margin="30 0 " |
|
MouseLeftButtonDown="Close_Click"> |
|
<Image Style="{StaticResource CloseHoverImageStyle}" Height="40"></Image> |
|
</Border> |
|
</Grid> |
|
</Grid> |
|
|
|
<Grid Row="1"> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition Width="*" /> |
|
<ColumnDefinition Width="*" /> |
|
</Grid.ColumnDefinitions> |
|
|
|
<!-- 左侧占位 --> |
|
<Grid Grid.Column="0"></Grid> |
|
|
|
<!-- 右侧主内容 --> |
|
<Grid Grid.Column="1" VerticalAlignment="Center"> |
|
<Grid.RowDefinitions> |
|
<!-- 第一排 --> |
|
<RowDefinition Height="8*" /> |
|
<RowDefinition Height="20" /> |
|
<!-- 第二排 --> |
|
<RowDefinition Height="5*" /> |
|
</Grid.RowDefinitions> |
|
|
|
<!-- 第一排按钮 --> |
|
<Button Grid.Row="0" Height="260" Width="500" BorderBrush="Transparent" |
|
Padding="0" FocusVisualStyle="{x:Null}" |
|
RenderTransformOrigin="0.5,0.5" |
|
RenderTransform="{StaticResource ButtonScaleTransform}" |
|
Command="{Binding ShowDiamondSelPageCommand}"> |
|
<Button.Background> |
|
<ImageBrush ImageSource="../../Resource/Images/UIResource/01-5.png"/> |
|
</Button.Background> |
|
<Button.Triggers> |
|
<EventTrigger RoutedEvent="UIElement.MouseEnter"> |
|
<BeginStoryboard Storyboard="{StaticResource MouseEnterStoryboard}" /> |
|
</EventTrigger> |
|
<EventTrigger RoutedEvent="UIElement.MouseLeave"> |
|
<BeginStoryboard Storyboard="{StaticResource MouseLeaveStoryboard}" /> |
|
</EventTrigger> |
|
</Button.Triggers> |
|
|
|
<Grid Width="450"> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition Width="1*"/> |
|
<ColumnDefinition Width="2*"/> |
|
</Grid.ColumnDefinitions> |
|
<Grid.RowDefinitions> |
|
<RowDefinition Height="4*"/> |
|
<RowDefinition Height="2*"/> |
|
</Grid.RowDefinitions> |
|
<TextBlock Grid.Column="1" Grid.Row="0" Foreground="Azure" FontWeight="Bold" FontSize="46" |
|
TextAlignment="Center" |
|
Text="{StaticResource StartTest}"/> |
|
<TextBlock Grid.Column="1" Grid.Row="1" Foreground="Azure" FontWeight="Bold" FontSize="26" |
|
TextAlignment="Center" |
|
Text="{StaticResource StartTestFan}"/> |
|
</Grid> |
|
</Button> |
|
|
|
|
|
<!-- 第二排两个按钮 --> |
|
<Grid Grid.Row="2" Width="500"> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition Width="*" /> |
|
<ColumnDefinition Width="20" /> |
|
<ColumnDefinition Width="*" /> |
|
</Grid.ColumnDefinitions> |
|
|
|
<Button Grid.Column="0" Height="150" Width="240" BorderBrush="Transparent" |
|
Padding="0" FocusVisualStyle="{x:Null}" |
|
RenderTransformOrigin="0.5,0.5" |
|
RenderTransform="{StaticResource ButtonScaleTransform}" |
|
Command="{Binding ShowConfigPageCommand}"> |
|
<Button.Background> |
|
<ImageBrush Stretch="Uniform" ImageSource="../../Resource/Images/UIResource/01-6.png"/> |
|
</Button.Background> |
|
<Button.Triggers> |
|
<EventTrigger RoutedEvent="UIElement.MouseEnter"> |
|
<BeginStoryboard Storyboard="{StaticResource MouseEnterStoryboard}" /> |
|
</EventTrigger> |
|
<EventTrigger RoutedEvent="UIElement.MouseLeave"> |
|
<BeginStoryboard Storyboard="{StaticResource MouseLeaveStoryboard}" /> |
|
</EventTrigger> |
|
</Button.Triggers> |
|
|
|
<Grid Width="240"> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition Width="1*"/> |
|
<ColumnDefinition Width="2*"/> |
|
</Grid.ColumnDefinitions> |
|
<Grid.RowDefinitions> |
|
<RowDefinition Height="4*"/> |
|
<RowDefinition Height="2*"/> |
|
</Grid.RowDefinitions> |
|
<TextBlock Grid.Column="1" Grid.Row="0" Foreground="Azure" FontWeight="Bold" FontSize="42" |
|
TextAlignment="Center" |
|
Text="{StaticResource Config}"/> |
|
<TextBlock Grid.Column="1" Grid.Row="1" Foreground="Azure" FontWeight="Bold" FontSize="22" |
|
TextAlignment="Center" |
|
Text="{StaticResource ConfigFan}"/> |
|
</Grid> |
|
</Button> |
|
|
|
<Button Grid.Column="2" Height="150" Width="240" BorderBrush="Transparent" |
|
Padding="0" FocusVisualStyle="{x:Null}" |
|
RenderTransformOrigin="0.5,0.5" |
|
RenderTransform="{StaticResource ButtonScaleTransform}" |
|
Command="{Binding ShowHelperPageCommand}"> |
|
<Button.Background> |
|
<ImageBrush Stretch="Uniform" ImageSource="../../Resource/Images/UIResource/01-7.png"/> |
|
</Button.Background> |
|
<Button.Triggers> |
|
<EventTrigger RoutedEvent="UIElement.MouseEnter"> |
|
<BeginStoryboard Storyboard="{StaticResource MouseEnterStoryboard}" /> |
|
</EventTrigger> |
|
<EventTrigger RoutedEvent="UIElement.MouseLeave"> |
|
<BeginStoryboard Storyboard="{StaticResource MouseLeaveStoryboard}" /> |
|
</EventTrigger> |
|
</Button.Triggers> |
|
|
|
<Grid Width="240"> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition Width="1*"/> |
|
<ColumnDefinition Width="2*"/> |
|
</Grid.ColumnDefinitions> |
|
<Grid.RowDefinitions> |
|
<RowDefinition Height="4*"/> |
|
<RowDefinition Height="2*"/> |
|
</Grid.RowDefinitions> |
|
<TextBlock Grid.Column="1" Grid.Row="0" Foreground="Azure" FontWeight="Bold" FontSize="42" |
|
TextAlignment="Center" |
|
Text="{StaticResource Help}"/> |
|
<TextBlock Grid.Column="1" Grid.Row="1" Foreground="Azure" FontWeight="Bold" FontSize="22" |
|
TextAlignment="Center" |
|
Text="{StaticResource HelpFan}"/> |
|
</Grid> |
|
</Button> |
|
</Grid> |
|
</Grid> |
|
</Grid> |
|
<!-- <Button Click="ButtonBase_OnClick">TEST BTN 1</Button> --> |
|
</Grid> |
|
|
|
</Border>
|
|
|