mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-03-03 00:00:55 +08:00
feat: add AdornerLayer control.
This commit is contained in:
16
src/Semi.Avalonia/Controls/AdornerLayer.axaml
Normal file
16
src/Semi.Avalonia/Controls/AdornerLayer.axaml
Normal file
@@ -0,0 +1,16 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:ClassModifier="internal">
|
||||
<ControlTheme x:Key="{x:Type AdornerLayer}" TargetType="AdornerLayer">
|
||||
<Setter Property="DefaultFocusAdorner">
|
||||
<FocusAdornerTemplate>
|
||||
<Rectangle
|
||||
Margin="{DynamicResource AdornerLayerMargin}"
|
||||
Stroke="{DynamicResource AdornerLayerBackground}"
|
||||
StrokeDashArray="1,2"
|
||||
StrokeThickness="{DynamicResource AdornerLayerThickness}" />
|
||||
</FocusAdornerTemplate>
|
||||
</Setter>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
@@ -3,6 +3,7 @@
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/AdornerLayer.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/AutoCompleteBox.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Border.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Controls/Button.axaml" />
|
||||
|
||||
3
src/Semi.Avalonia/Themes/Dark/AdornerLayer.axaml
Normal file
3
src/Semi.Avalonia/Themes/Dark/AdornerLayer.axaml
Normal file
@@ -0,0 +1,3 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<SolidColorBrush x:Key="AdornerLayerBackground" Color="White" />
|
||||
</ResourceDictionary>
|
||||
@@ -2,6 +2,7 @@
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Palette.axaml" />
|
||||
<!-- Controls -->
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/AdornerLayer.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/AutoCompleteBox.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Border.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Dark/Button.axaml" />
|
||||
|
||||
3
src/Semi.Avalonia/Themes/Light/AdornerLayer.axaml
Normal file
3
src/Semi.Avalonia/Themes/Light/AdornerLayer.axaml
Normal file
@@ -0,0 +1,3 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<SolidColorBrush x:Key="AdornerLayerBackground" Color="#1C1F23" />
|
||||
</ResourceDictionary>
|
||||
@@ -2,6 +2,7 @@
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Palette.axaml" />
|
||||
<!-- Controls -->
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/AdornerLayer.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/AutoCompleteBox.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Border.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Light/Button.axaml" />
|
||||
|
||||
4
src/Semi.Avalonia/Themes/Shared/AdornerLayer.axaml
Normal file
4
src/Semi.Avalonia/Themes/Shared/AdornerLayer.axaml
Normal file
@@ -0,0 +1,4 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Thickness x:Key="AdornerLayerMargin">1</Thickness>
|
||||
<x:Double x:Key="AdornerLayerThickness">1</x:Double>
|
||||
</ResourceDictionary>
|
||||
@@ -2,6 +2,7 @@
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Shared/Palette.axaml" />
|
||||
<!-- Controls -->
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Shared/AdornerLayer.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Shared/AutoCompleteBox.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Shared/Border.axaml" />
|
||||
<ResourceInclude Source="avares://Semi.Avalonia/Themes/Shared/Button.axaml" />
|
||||
|
||||
Reference in New Issue
Block a user