Skip to content

Commit 22dda17

Browse files
committed
feat: add avalonia EmbeddableControlRoot style.
1 parent 3b02ece commit 22dda17

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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 EmbeddableControlRoot}"
6+
TargetType="EmbeddableControlRoot">
7+
<Setter Property="Foreground"
8+
Value="{DynamicResource PrimaryTextBrush}" />
9+
<Setter Property="Background"
10+
Value="{DynamicResource RegionBrush}" />
11+
<Setter Property="FontSize"
12+
Value="12" />
13+
<Setter Property="Template">
14+
<ControlTemplate>
15+
<Panel>
16+
<Border Name="PART_TransparencyFallback"
17+
IsHitTestVisible="False" />
18+
<Border Background="{TemplateBinding Background}">
19+
<VisualLayerManager>
20+
<ContentPresenter Name="PART_ContentPresenter"
21+
Margin="{TemplateBinding Padding}"
22+
Content="{TemplateBinding Content}"
23+
ContentTemplate="{TemplateBinding ContentTemplate}" />
24+
</VisualLayerManager>
25+
</Border>
26+
</Panel>
27+
</ControlTemplate>
28+
</Setter>
29+
</ControlTheme>
30+
31+
</ResourceDictionary>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/DataValidationErrors.axaml" />
2020
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/FlyoutPresenter.axaml" />
2121
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/MenuFlyoutPresenter.axaml" />
22+
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/EmbeddableControlRoot.axaml" />
2223
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/TransitioningContentControl.axaml" />
2324
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/PopupRoot.axaml" />
2425
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/PathIcon.axaml" />

0 commit comments

Comments
 (0)