Skip to content

Commit 3717325

Browse files
committed
feat: add avalonia Separator style.
1 parent ee277a2 commit 3717325

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/TransitioningContentControl.axaml" />
2222
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/PopupRoot.axaml" />
2323
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/PathIcon.axaml" />
24+
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/Separator.axaml" />
2425
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/ToolTip.axaml" />
2526
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/TextBlock.axaml" />
2627
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/ContentControl.axaml" />
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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 Separator}"
6+
TargetType="Separator">
7+
<Setter Property="Focusable"
8+
Value="False" />
9+
<Setter Property="Background"
10+
Value="{DynamicResource BorderBrush}" />
11+
<Setter Property="Margin"
12+
Value="29,2,0,2" />
13+
<Setter Property="Height"
14+
Value="1" />
15+
<Setter Property="Template">
16+
<ControlTemplate>
17+
<Border Background="{TemplateBinding Background}"
18+
BorderBrush="{TemplateBinding BorderBrush}"
19+
BorderThickness="{TemplateBinding BorderThickness}"
20+
CornerRadius="{TemplateBinding CornerRadius}" />
21+
</ControlTemplate>
22+
</Setter>
23+
</ControlTheme>
24+
25+
</ResourceDictionary>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<ResourceDictionary xmlns="https://github.com/avaloniaui"
2-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
2+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3+
x:ClassModifier="internal">
34

45
<ControlTheme x:Key="{x:Type TransitioningContentControl}"
56
TargetType="TransitioningContentControl">

0 commit comments

Comments
 (0)