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
@@ -0,0 +1,29 @@
using Avalonia;
using Avalonia.Controls.Templates;
namespace Toolkit.UI.Controls.Avalonia;
public class SettingsExpanderItem :
FluentAvalonia.UI.Controls.SettingsExpanderItem
{
public static readonly StyledProperty<object> ActionProperty =
AvaloniaProperty.Register<SettingsExpanderItem, object>(nameof(Action));
public static readonly StyledProperty<IDataTemplate> ActionTemplateProperty =
AvaloniaProperty.Register<SettingsExpanderItem, 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(SettingsExpanderItem);
}