now with less flickering

This commit is contained in:
TheXamlGuy
2024-07-12 22:40:53 +01:00
parent 419f27a932
commit b552aac82e
4 changed files with 98 additions and 1 deletions
@@ -1,4 +1,6 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Primitives;
using Avalonia.Controls.Templates;
namespace Toolkit.UI.Controls.Avalonia;
@@ -12,6 +14,9 @@ public class SettingsExpander :
public static readonly StyledProperty<IDataTemplate> ActionTemplateProperty =
AvaloniaProperty.Register<SettingsExpander, IDataTemplate>(nameof(ActionTemplate));
public static readonly StyledProperty<bool> IsToggleableProperty =
AvaloniaProperty.Register<SettingsExpander, bool>(nameof(IsToggleable));
public object Action
{
get => GetValue(ActionProperty);
@@ -24,6 +29,13 @@ public class SettingsExpander :
set => SetValue(ActionTemplateProperty, value);
}
public bool IsToggleable
{
get => GetValue(IsToggleableProperty);
set => SetValue(IsToggleableProperty, value);
}
protected override Type StyleKeyOverride =>
typeof(SettingsExpander);
}