mirror of
https://github.com/AtomUI/AtomUI.git
synced 2026-10-23 01:38:40 +08:00
Add EmbeddableControlRootTheme
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
<ResourceInclude Source="ComboBox/Themes/ComboBoxThemes.axaml" />
|
||||
<ResourceInclude Source="DatePicker/Themes/DatePickerThemes.axaml" />
|
||||
<ResourceInclude Source="Drawer/Themes/DrawerThemes.axaml" />
|
||||
<ResourceInclude Source="Embedding/Themes/EmbeddableControlRootTheme.axaml" />
|
||||
<ResourceInclude Source="EmptyIndicator/Themes/EmptyIndicatorTheme.axaml" />
|
||||
<ResourceInclude Source="Expander/Themes/ExpanderTheme.axaml" />
|
||||
<ResourceInclude Source="Flyouts/Themes/FlyoutThemes.axaml" />
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:atom="https://atomui.net">
|
||||
<ControlTheme x:Key="{x:Type EmbeddableControlRoot}" TargetType="EmbeddableControlRoot">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<Panel>
|
||||
<Border Name="{x:Static atom:EmbeddingThemeConstants.TransparencyFallbackPart}" IsHitTestVisible="False" />
|
||||
<Border Background="{TemplateBinding Background}">
|
||||
<VisualLayerManager>
|
||||
<ContentPresenter Name="{x:Static atom:EmbeddingThemeConstants.ContentPresenterPart}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
Content="{TemplateBinding Content}"
|
||||
Margin="{TemplateBinding Padding}"/>
|
||||
</VisualLayerManager>
|
||||
</Border>
|
||||
</Panel>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Setter Property="Background" Value="{DynamicResource {x:Static atom:WindowTokenKey.DefaultBackground}}" />
|
||||
<Setter Property="TransparencyBackgroundFallback" Value="{DynamicResource {x:Static atom:WindowTokenKey.DefaultBackground}}" />
|
||||
<Setter Property="TopLevel.SystemBarColor" Value="{DynamicResource {x:Static atom:WindowTokenKey.SystemBarColor}}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static atom:WindowTokenKey.DefaultForeground}}" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource {x:Static atom:SharedTokenKey.FontSize}}" />
|
||||
<Setter Property="FontFamily" Value="{DynamicResource {x:Static atom:SharedTokenKey.FontFamily}}" />
|
||||
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace AtomUI.Controls.Themes;
|
||||
|
||||
internal static class EmbeddingThemeConstants
|
||||
{
|
||||
public const string TransparencyFallbackPart = "PART_TransparencyFallback";
|
||||
public const string ContentPresenterPart = "PART_ContentPresenter";
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
Orientation="Vertical"
|
||||
Grid.Row="0"
|
||||
Grid.Column="1" />
|
||||
<Panel x:Name="{x:Static atom:ScrollViewerThemeConstants.ScrollBarsSeparatorPart}"
|
||||
<Panel Name="{x:Static atom:ScrollViewerThemeConstants.ScrollBarsSeparatorPart}"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Background="{DynamicResource {x:Static atom:SharedTokenKey.ColorBgContainer}}"
|
||||
|
||||
Reference in New Issue
Block a user