|
31 | 31 | </i:Interaction.Triggers> |
32 | 32 | <wpf:PackIcon Kind="ChevronRight" |
33 | 33 | FlowDirection="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type mah:Flyout}}, Path=FlowDirection}" |
34 | | - Width="{DynamicResource MahApps.Sizes.Font.FlyoutHeader}" |
35 | | - Height="{DynamicResource MahApps.Sizes.Font.FlyoutHeader}" /> |
| 34 | + Width="{DynamicResource MahApps.Font.Size.Flyout.Header}" |
| 35 | + Height="{DynamicResource MahApps.Font.Size.Flyout.Header}" /> |
36 | 36 | </Button> |
37 | 37 | <ContentControl x:Name="PART_BackHeaderText" |
38 | 38 | Margin="15 0 0 0" |
|
45 | 45 | </wpf:ColorZone> |
46 | 46 | <DataTemplate.Triggers> |
47 | 47 | <DataTrigger Binding="{Binding Position, RelativeSource={RelativeSource AncestorType={x:Type mah:Flyout}}}" Value="Left"> |
48 | | - <Setter TargetName="PART_BackHeaderText" Property="Margin" Value="0 0 15 0" /> |
49 | | - <Setter TargetName="PART_BackHeaderText" Property="HorizontalAlignment" Value="Right" /> |
50 | 48 | <Setter TargetName="PART_BackButton" Property="DockPanel.Dock" Value="Right" /> |
51 | 49 | <Setter TargetName="PART_BackButton" Property="LayoutTransform"> |
52 | 50 | <Setter.Value> |
53 | 51 | <ScaleTransform ScaleX="-1" /> |
54 | 52 | </Setter.Value> |
55 | 53 | </Setter> |
| 54 | + <Setter TargetName="PART_BackHeaderText" Property="HorizontalAlignment" Value="Right" /> |
| 55 | + <Setter TargetName="PART_BackHeaderText" Property="Margin" Value="0 0 15 0" /> |
56 | 56 | </DataTrigger> |
57 | 57 | <DataTrigger Binding="{Binding Position, RelativeSource={RelativeSource AncestorType={x:Type mah:Flyout}}}" Value="Top"> |
58 | 58 | <Setter TargetName="PART_ColorZone" Property="VerticalAlignment" Value="Stretch" /> |
|
74 | 74 | </DataTemplate> |
75 | 75 |
|
76 | 76 | <ControlTemplate x:Key="FlyoutTemplate" TargetType="{x:Type mah:Flyout}"> |
77 | | - <Grid x:Name="PART_Root" |
78 | | - Background="{TemplateBinding Background}"> |
79 | | - <Grid.RenderTransform> |
| 77 | + <Border x:Name="PART_Root" |
| 78 | + Background="{TemplateBinding Background}" |
| 79 | + BorderBrush="{TemplateBinding BorderBrush}" |
| 80 | + BorderThickness="{TemplateBinding BorderThickness}"> |
| 81 | + <Border.RenderTransform> |
80 | 82 | <TranslateTransform /> |
81 | | - </Grid.RenderTransform> |
82 | | - <AdornerDecorator x:Name="PART_Border" CacheMode="{Binding RelativeSource={RelativeSource Self}, Path=(wpf:ShadowAssist.CacheMode)}"> |
83 | | - <Border Background="{TemplateBinding Background}" Effect="{DynamicResource MaterialDesignShadowDepth5}" /> |
84 | | - </AdornerDecorator> |
85 | | - <AdornerDecorator> |
86 | | - <DockPanel FocusVisualStyle="{x:Null}" Focusable="False"> |
87 | | - <mah:MetroThumbContentControl x:Name="PART_Header" |
88 | | - Content="{TemplateBinding Header}" |
89 | | - ContentCharacterCasing="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ControlsHelper.ContentCharacterCasing)}" |
90 | | - ContentStringFormat="{TemplateBinding HeaderStringFormat}" |
91 | | - ContentTemplate="{TemplateBinding HeaderTemplate}" |
92 | | - ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" |
93 | | - DockPanel.Dock="Top" |
94 | | - FontFamily="{TemplateBinding mah:HeaderedControlHelper.HeaderFontFamily}" |
95 | | - FontSize="{TemplateBinding mah:HeaderedControlHelper.HeaderFontSize}" |
96 | | - FontStretch="{TemplateBinding mah:HeaderedControlHelper.HeaderFontStretch}" |
97 | | - FontWeight="{TemplateBinding mah:HeaderedControlHelper.HeaderFontWeight}" |
98 | | - SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/> |
99 | | - <ContentPresenter x:Name="PART_Content" |
100 | | - ContentSource="Content" |
101 | | - DockPanel.Dock="Bottom" /> |
102 | | - </DockPanel> |
103 | | - </AdornerDecorator> |
| 83 | + </Border.RenderTransform> |
| 84 | + <Grid> |
| 85 | + <AdornerDecorator x:Name="PART_ShadowBorder" CacheMode="{Binding RelativeSource={RelativeSource Self}, Path=(wpf:ShadowAssist.CacheMode)}"> |
| 86 | + <Border Background="{TemplateBinding Background}" Effect="{DynamicResource MaterialDesignShadowDepth5}" /> |
| 87 | + </AdornerDecorator> |
| 88 | + <AdornerDecorator> |
| 89 | + <DockPanel FocusVisualStyle="{x:Null}" Focusable="False"> |
| 90 | + <mah:MetroThumbContentControl x:Name="PART_Header" |
| 91 | + Padding="0" |
| 92 | + Content="{TemplateBinding Header}" |
| 93 | + ContentCharacterCasing="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ControlsHelper.ContentCharacterCasing)}" |
| 94 | + ContentStringFormat="{TemplateBinding HeaderStringFormat}" |
| 95 | + ContentTemplate="{TemplateBinding HeaderTemplate}" |
| 96 | + ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" |
| 97 | + DockPanel.Dock="Top" |
| 98 | + FontFamily="{TemplateBinding mah:HeaderedControlHelper.HeaderFontFamily}" |
| 99 | + FontSize="{TemplateBinding mah:HeaderedControlHelper.HeaderFontSize}" |
| 100 | + FontStretch="{TemplateBinding mah:HeaderedControlHelper.HeaderFontStretch}" |
| 101 | + FontWeight="{TemplateBinding mah:HeaderedControlHelper.HeaderFontWeight}" |
| 102 | + SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> |
| 103 | + <ContentPresenter x:Name="PART_Content" |
| 104 | + ContentSource="Content" |
| 105 | + DockPanel.Dock="Bottom" /> |
| 106 | + </DockPanel> |
| 107 | + </AdornerDecorator> |
| 108 | + </Grid> |
104 | 109 | <VisualStateManager.VisualStateGroups> |
105 | 110 | <VisualStateGroup> |
106 | 111 | <VisualState x:Name="Default" /> |
|
131 | 136 | Value="0" /> |
132 | 137 | </DoubleAnimationUsingKeyFrames> |
133 | 138 | <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" |
134 | | - Storyboard.TargetName="PART_Border" |
| 139 | + Storyboard.TargetName="PART_ShadowBorder" |
135 | 140 | Storyboard.TargetProperty="(UIElement.Opacity)"> |
136 | 141 | <SplineDoubleKeyFrame KeySpline="0.25,1,0.05,1" |
137 | 142 | KeyTime="00:00:00.750" |
|
206 | 211 | </VisualState> |
207 | 212 | </VisualStateGroup> |
208 | 213 | </VisualStateManager.VisualStateGroups> |
209 | | - </Grid> |
| 214 | + </Border> |
210 | 215 | <ControlTemplate.Triggers> |
211 | 216 | <Trigger Property="Position" Value="Top"> |
212 | 217 | <Setter TargetName="PART_Content" Property="DockPanel.Dock" Value="Right" /> |
|
236 | 241 | <Style TargetType="{x:Type mah:Flyout}"> |
237 | 242 | <Setter Property="Foreground" Value="{DynamicResource MaterialDesignBody}" /> |
238 | 243 | <Setter Property="Background" Value="{DynamicResource MaterialDesignPaper}" /> |
| 244 | + <Setter Property="BorderThickness" Value="0" /> |
239 | 245 | <Setter Property="FocusVisualStyle" Value="{x:Null}" /> |
240 | 246 | <Setter Property="mah:HeaderedControlHelper.HeaderFontSize" Value="{DynamicResource MahApps.Font.Size.Flyout.Header}" /> |
241 | 247 | <Setter Property="mah:HeaderedControlHelper.HeaderMargin" Value="10" /> |
|
0 commit comments