Skip to content

Commit eecfd3e

Browse files
committed
feat: add avalonia OverlayPopupHost style.
1 parent 22dda17 commit eecfd3e

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

src/Avalonia/HandyControl_Avalonia/Themes/Styles/MergedStyles.axaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/EmbeddableControlRoot.axaml" />
2323
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/TransitioningContentControl.axaml" />
2424
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/PopupRoot.axaml" />
25+
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/OverlayPopupHost.axaml" />
2526
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/PathIcon.axaml" />
2627
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/Separator.axaml" />
2728
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/ToolTip.axaml" />
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<ResourceDictionary xmlns="https://github.com/avaloniaui"
2+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3+
x:ClassModifier="internal">
4+
5+
<ControlTheme x:Key="{x:Type OverlayPopupHost}"
6+
TargetType="OverlayPopupHost">
7+
<Setter Property="Foreground"
8+
Value="{DynamicResource PrimaryTextBrush}" />
9+
<Setter Property="FontSize"
10+
Value="12" />
11+
<Setter Property="Template">
12+
<ControlTemplate>
13+
<LayoutTransformControl LayoutTransform="{TemplateBinding Transform}">
14+
<VisualLayerManager IsPopup="True">
15+
<ContentPresenter Name="PART_ContentPresenter"
16+
Padding="{TemplateBinding Padding}"
17+
Background="{TemplateBinding Background}"
18+
Content="{TemplateBinding Content}"
19+
ContentTemplate="{TemplateBinding ContentTemplate}" />
20+
</VisualLayerManager>
21+
</LayoutTransformControl>
22+
</ControlTemplate>
23+
</Setter>
24+
</ControlTheme>
25+
26+
</ResourceDictionary>

0 commit comments

Comments
 (0)