You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.1 KiB
42 lines
1.1 KiB
1 year ago
|
using Avalonia;
|
||
12 months ago
|
using Avalonia.Controls;
|
||
12 months ago
|
using Avalonia.Controls.Primitives;
|
||
1 year ago
|
using StabilityMatrix.Core.Attributes;
|
||
1 year ago
|
|
||
|
namespace StabilityMatrix.Avalonia.Controls;
|
||
|
|
||
1 year ago
|
[Transient]
|
||
12 months ago
|
public class StackExpander : TemplatedControl
|
||
1 year ago
|
{
|
||
12 months ago
|
public static readonly StyledProperty<bool> IsExpandedProperty = Expander
|
||
|
.IsExpandedProperty
|
||
|
.AddOwner<StackExpander>();
|
||
|
|
||
|
public static readonly StyledProperty<ExpandDirection> ExpandDirectionProperty = Expander
|
||
|
.ExpandDirectionProperty
|
||
|
.AddOwner<StackExpander>();
|
||
|
|
||
|
public static readonly StyledProperty<int> SpacingProperty = AvaloniaProperty.Register<StackCard, int>(
|
||
|
"Spacing",
|
||
|
8
|
||
|
);
|
||
|
|
||
|
public ExpandDirection ExpandDirection
|
||
|
{
|
||
|
get => GetValue(ExpandDirectionProperty);
|
||
|
set => SetValue(ExpandDirectionProperty, value);
|
||
|
}
|
||
|
|
||
|
public bool IsExpanded
|
||
|
{
|
||
|
get => GetValue(IsExpandedProperty);
|
||
|
set => SetValue(IsExpandedProperty, value);
|
||
|
}
|
||
1 year ago
|
|
||
|
public int Spacing
|
||
|
{
|
||
|
get => GetValue(SpacingProperty);
|
||
|
set => SetValue(SpacingProperty, value);
|
||
|
}
|
||
|
}
|