1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<Window x:Class="FLY.ControlLibrary.Window_WarningTip"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window_Tip" Width="800" Height="430" WindowStyle="None" ShowInTaskbar="False" ResizeMode="NoResize" Loaded="Window_Loaded" HorizontalContentAlignment="Right" VerticalContentAlignment="Bottom" WindowStartupLocation="CenterScreen" AllowsTransparency="True" Background="{x:Null}" >
<Window.Resources>
<ResourceDictionary>
<Style TargetType="Button" x:Key="ButtonStyle2">
<Setter Property="Width" Value="185"/>
<Setter Property="Height" Value="85"/>
<Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="48" />
<Setter Property="FontFamily" Value="YouYuan" />
<Setter Property="Background" Value="#FF3B3B3B" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<StackPanel Orientation="Vertical">
<Border Background="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
<ContentPresenter RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsKeyboardFocused" Value="true">
</Trigger>
<Trigger Property="IsEnabled" Value="false">
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Opacity" Value="0.5"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</Window.Resources>
<Grid>
<Border Background="Red" Opacity="0.9" />
<StackPanel Margin="80,40">
<TextBlock Text="{Binding Title}" FontWeight="Bold" FontSize="72" FontFamily="YouYuan" Margin="40,20" Foreground="White" />
<TextBlock Text="{Binding Message}" FontWeight="Bold" FontSize="36" FontFamily="YouYuan" Margin="40,20" TextWrapping="Wrap" Foreground="White" />
</StackPanel>
<StackPanel Orientation="Horizontal" FlowDirection="RightToLeft" VerticalAlignment="Bottom" Margin="10,0">
<StackPanel.Resources>
<Style TargetType="Button">
<Setter Property="FlowDirection" Value="LeftToRight"/>
<Setter Property="Width" Value="182"/>
<Setter Property="Height" Value="82"/>
<Setter Property="Margin" Value="10"/>
<Setter Property="Background" Value="Red"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="48"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<StackPanel Orientation="Vertical">
<Border BorderThickness="2" BorderBrush="White" Background="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
<ContentPresenter RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsKeyboardFocused" Value="true">
</Trigger>
<Trigger Property="IsEnabled" Value="false">
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Opacity" Value="0.5"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</StackPanel.Resources>
<Button Content="{Binding OKContent}" FontFamily="YouYuan" Click="button_ok_Click"/>
</StackPanel>
</Grid>
</Window>