自定义一个漂亮的window窗口UI
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:BlurBehindDemo" x:Class="BlurBehindDemo.MainWindow" Title="Hello Blur!" Height="781.25" Width="1275.568" Background="#00FFFFFF" AllowsTransparency="True" WindowStyle="None" WindowStartupLocation="CenterScreen" Loaded="Window_Loaded"> <Grid > <Border CornerRadius="12" BorderThickness="8" Margin="12" BorderBrush="#E5FFFFFF" > <Border.Effect> <DropShadowEffect /> </Border.Effect> <Grid Opacity="0.8"> <Grid.Background> <ImageBrush ImageSource="Assets/Hydrangeas.jpg"/> </Grid.Background> </Grid> </Border> <Border CornerRadius="12" BorderThickness="8" Margin="12" BorderBrush="#E5FFFFFF" > <Border.Effect> <DropShadowEffect Direction="125" /> </Border.Effect> </Border> <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="64" Foreground="Red"><Run Text="Hello Blur!"/></TextBlock> <Grid HorizontalAlignment="Left" Height="615" Margin="126,38,0,0" VerticalAlignment="Top" Width="1075"> <Grid.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#E5FFFFFF" Offset="0.326"/> <GradientStop Offset="1" Color="#A8AE0D91"/> </LinearGradientBrush> </Grid.Background> <Button Content="Button" HorizontalAlignment="Left" Margin="237,263,0,0" VerticalAlignment="Top" Width="363" Height="141" /> </Grid> </Grid> </Window>