feat: add GroupBox.

This commit is contained in:
Zhang Dian
2025-09-02 16:19:00 +08:00
committed by Dong Bin
parent 925c368c53
commit 646c9c0dbb
4 changed files with 23 additions and 6 deletions

View File

@@ -0,0 +1,6 @@
<ResourceDictionary
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:CompileBindings="True">
<StaticResource x:Key="{x:Type GroupBox}" ResourceKey="GroupBox"/>
</ResourceDictionary>

View File

@@ -1,7 +1,8 @@
<ResourceDictionary
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:Avalonia.Controls.Converters;assembly=Avalonia.Controls">
xmlns:iri="https://irihi.tech/shared"
x:CompileBindings="True">
<Design.PreviewWith>
<StackPanel Spacing="20">
<HeaderedContentControl
@@ -23,7 +24,6 @@
</HeaderedContentControl>
</StackPanel>
</Design.PreviewWith>
<converters:MarginMultiplierConverter x:Key="SeparatorBorderMultiplier" Top="True" Indent="1" />
<ControlTheme x:Key="{x:Type HeaderedContentControl}" TargetType="HeaderedContentControl">
<Setter Property="Padding" Value="3" />
@@ -97,7 +97,7 @@
Name="SeparatorBorder"
Grid.Row="1"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness, Converter={StaticResource SeparatorBorderMultiplier}}">
BorderThickness="{TemplateBinding BorderThickness, Converter={iri:ThicknessMixerConverter Top}}">
<Border.IsVisible>
<MultiBinding Converter="{x:Static BoolConverters.And}">
<TemplateBinding Property="Header" Converter="{x:Static ObjectConverters.IsNotNull}" />

View File

@@ -22,6 +22,7 @@
<ResourceInclude Source="Expander.axaml" />
<ResourceInclude Source="FlyoutPresenter.axaml" />
<ResourceInclude Source="GridSplitter.axaml" />
<ResourceInclude Source="GroupBox.axaml" />
<ResourceInclude Source="HeaderedContentControl.axaml" />
<ResourceInclude Source="HyperlinkButton.axaml" />
<ResourceInclude Source="ItemsControl.axaml" />