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
|
<Window x:Class="MainWindowWithAeroShadow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:aero="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
WindowStyle="None"
WindowStartupLocation="CenterScreen"
Background="Transparent"
AllowsTransparency="True"
Title="MainWindow WithAeroShadow"
Height="300" Width="300">
<!--exemple msdn 1 using a SystemDropShadowChrome:-->
<Window.Resources>
<Color x:Key="ShadowColor">#887D955B</Color>
<LinearGradientBrush x:Key="SplashBackgroundBrush" StartPoint="0,0" EndPoint="1,1">
<LinearGradientBrush.GradientStops>
<GradientStop Offset="0.0" Color="#FFC6E798"/>
<GradientStop Offset="1.0" Color="#FFEBF7DB"/>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Window.Resources>
<aero:SystemDropShadowChrome
Color="{StaticResource ShadowColor}"
CornerRadius="10"
Margin="0,0,3,3">
<Border
CornerRadius="10"
Background="#FFEAEBDD"
Margin="0,0,3,3">
</Border>
</aero:SystemDropShadowChrome>
</Window> |
Partager