-
-
Notifications
You must be signed in to change notification settings - Fork 995
Expand file tree
/
Copy pathFlyout.xaml
More file actions
85 lines (80 loc) · 4.61 KB
/
Copy pathFlyout.xaml
File metadata and controls
85 lines (80 loc) · 4.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
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
<!--
This Source Code Form is subject to the terms of the MIT License.
If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
Copyright (C) Leszek Pomianowski and WPF UI Contributors.
All Rights Reserved.
Based on Microsoft XAML for Win UI
Copyright (c) Microsoft Corporation. All Rights Reserved.
-->
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:Wpf.Ui.Controls">
<Style x:Key="DefaultFlyoutStyle" TargetType="{x:Type controls:Flyout}">
<Setter Property="Background" Value="{DynamicResource FlyoutBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource FlyoutBorderBrush}" />
<Setter Property="Margin" Value="0" />
<Setter Property="MinWidth" Value="20" />
<Setter Property="MinHeight" Value="20" />
<Setter Property="Padding" Value="12" />
<Setter Property="VerticalAlignment" Value="Bottom" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="Placement" Value="Top" />
<Setter Property="Popup.AllowsTransparency" Value="True" />
<Setter Property="Popup.StaysOpen" Value="False" />
<Setter Property="Popup.PopupAnimation" Value="Fade" />
<Setter Property="Popup.VerticalOffset" Value="1" />
<Setter Property="Focusable" Value="False" />
<Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:Flyout}">
<Grid>
<Popup
x:Name="PART_Popup"
MinWidth="{TemplateBinding MinWidth}"
MinHeight="{TemplateBinding MinHeight}"
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
VerticalAlignment="{TemplateBinding VerticalAlignment}"
AllowsTransparency="{TemplateBinding Popup.AllowsTransparency}"
Focusable="False"
IsOpen="{TemplateBinding IsOpen}"
Placement="{TemplateBinding Placement}"
PopupAnimation="{TemplateBinding Popup.PopupAnimation}"
StaysOpen="{TemplateBinding Popup.StaysOpen}"
VerticalOffset="1">
<controls:EffectThicknessDecorator Thickness="30">
<Border
x:Name="PopupBorder"
Margin="{TemplateBinding Margin}"
Padding="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="1"
CornerRadius="{DynamicResource PopupCornerRadius}"
SnapsToDevicePixels="True">
<Border.Effect>
<DropShadowEffect
BlurRadius="20"
Direction="270"
Opacity="0.135"
ShadowDepth="10"
Color="#202020" />
</Border.Effect>
<ContentPresenter Content="{TemplateBinding Content}" />
</Border>
</controls:EffectThicknessDecorator>
</Popup>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style BasedOn="{StaticResource DefaultFlyoutStyle}" TargetType="{x:Type controls:Flyout}" />
</ResourceDictionary>