Repository navigation
Expand file tree
/
Copy pathAcrylicBlurWindowExample.xaml
More file actions
53 lines (51 loc) · 2.61 KB
/
Copy pathAcrylicBlurWindowExample.xaml
File metadata and controls
53 lines (51 loc) · 2.61 KB
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
<Window x:Class="WPFDevelopers.Samples.ExampleViews.AcrylicBlurWindowExample"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WPFDevelopers.Samples.ExampleViews"
xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers"
mc:Ignorable="d" WindowStartupLocation="CenterScreen"
ResizeMode="CanMinimize"
Title="Login" Height="350" Width="400">
<wd:WindowAcrylicBlur.WindowAcrylicBlur>
<wd:WindowAcrylicBlur BlurColor="AliceBlue" Opacity="0.2"/>
</wd:WindowAcrylicBlur.WindowAcrylicBlur>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition/>
</Grid.RowDefinitions>
<StackPanel HorizontalAlignment="Right"
Orientation="Horizontal"
x:Name="myStackPanel">
<Button Style="{DynamicResource WD.WindowButtonStyle}"
Command="{Binding CloseCommand,RelativeSource={RelativeSource AncestorType=local:AcrylicBlurWindowExample}}" Cursor="Hand">
<Path Width="10" Height="10"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="{DynamicResource WD.WindowCloseGeometry}"
Fill="Red"
Stretch="Fill" />
</Button>
</StackPanel>
<StackPanel Grid.Row="1" Margin="40,0,40,0"
x:Name="MyStackPanelContent">
<Image Source="/WPFDevelopers.ico" Width="80" Height="80"/>
<TextBox wd:ElementHelper.Watermark="账户" Margin="0,20,0,0" Cursor="Hand"/>
<PasswordBox wd:ElementHelper.Watermark="密码" Margin="0,20,0,0" Cursor="Hand"/>
<Button x:Name="LoginButton"
Content="登 录"
Margin="0,20,0,0"
Style="{StaticResource WD.PrimaryButton}"/>
<Grid Margin="0 20 0 0">
<TextBlock FontSize="12">
<Hyperlink Foreground="Black" TextDecorations="None">忘记密码</Hyperlink>
</TextBlock>
<TextBlock FontSize="12" HorizontalAlignment="Right" Margin="0 0 -1 0">
<Hyperlink Foreground="#4370F5" TextDecorations="None">注册账号</Hyperlink>
</TextBlock>
</Grid>
</StackPanel>
</Grid>
</Window>