using Avalonia.Markup.Xaml.Templates; using Avalonia.Metadata; using Avalonia.Styling; namespace Avalonia.Xaml.Interactivity; /// /// A template for creating a collection of objects. /// public class BehaviorCollectionTemplate : ITemplate { /// /// Gets or sets the content of the template. /// [Content] [TemplateContent(TemplateResultType = typeof(BehaviorCollection))] public object? Content { get; set; } /// /// Builds the collection of behaviors from the template. /// /// The collection of behaviors created from the template. object? ITemplate.Build() => TemplateContent.Load(Content)?.Result; }