Added Action content to SettingsExpander

This commit is contained in:
TheXamlGuy
2024-07-06 12:11:39 +01:00
parent 5654b86cea
commit 543ea01e62
5 changed files with 211 additions and 16 deletions
@@ -1,7 +1,29 @@
namespace Toolkit.UI.Controls.Avalonia;
using Avalonia;
using Avalonia.Controls.Templates;
public class SettingsExpander : FluentAvalonia.UI.Controls.SettingsExpander
namespace Toolkit.UI.Controls.Avalonia;
public class SettingsExpander :
FluentAvalonia.UI.Controls.SettingsExpander
{
public static readonly StyledProperty<object> ActionProperty =
AvaloniaProperty.Register<SettingsExpander, object>(nameof(Action));
public static readonly StyledProperty<IDataTemplate> ActionTemplateProperty =
AvaloniaProperty.Register<SettingsExpander, IDataTemplate>(nameof(ActionTemplate));
public object Action
{
get => GetValue(ActionProperty);
set => SetValue(ActionProperty, value);
}
public IDataTemplate ActionTemplate
{
get => GetValue(ActionTemplateProperty);
set => SetValue(ActionTemplateProperty, value);
}
protected override Type StyleKeyOverride =>
typeof(FluentAvalonia.UI.Controls.SettingsExpander);
}
typeof(SettingsExpander);
}