Skip to content

Commit a489341

Browse files
committed
feat: add avalonia GridSplitter style.
1 parent eecfd3e commit a489341

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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 GridSplitter}"
6+
TargetType="GridSplitter">
7+
<Setter Property="Focusable"
8+
Value="True" />
9+
<Setter Property="MinWidth"
10+
Value="1" />
11+
<Setter Property="MinHeight"
12+
Value="1" />
13+
<Setter Property="Background"
14+
Value="{DynamicResource BorderBrush}" />
15+
<Setter Property="PreviewContent">
16+
<Template>
17+
<Rectangle Fill="{DynamicResource DarkOpacityBrush}" />
18+
</Template>
19+
</Setter>
20+
<Setter Property="Template">
21+
<ControlTemplate>
22+
<Border Background="{TemplateBinding Background}"
23+
BorderBrush="{TemplateBinding BorderBrush}"
24+
BorderThickness="{TemplateBinding BorderThickness}"
25+
CornerRadius="{TemplateBinding CornerRadius}" />
26+
</ControlTemplate>
27+
</Setter>
28+
</ControlTheme>
29+
30+
</ResourceDictionary>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/OverlayPopupHost.axaml" />
2626
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/PathIcon.axaml" />
2727
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/Separator.axaml" />
28+
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/GridSplitter.axaml" />
2829
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/ToolTip.axaml" />
2930
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/TextBlock.axaml" />
3031
<MergeResourceInclude Source="avares://HandyControl/Themes/Styles/ContentControl.axaml" />

0 commit comments

Comments
 (0)