Skip to content

Commit

Permalink
ItemsRepeater inherit datacontext from items attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
amwx committed Jun 22, 2024
1 parent cfa43e0 commit 5a75395
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
using Avalonia.Metadata;
using FluentAvalonia.Core;

namespace FluentAvalonia.UI.Controls;
Expand Down Expand Up @@ -86,6 +87,7 @@ public object ItemsSource
/// <summary>
/// Gets or sets the template used to display each item.
/// </summary>
[InheritDataTypeFromItems(nameof(ItemsSource))]
public IDataTemplate ItemTemplate
{
get => GetValue(ItemTemplateProperty);
Expand Down

0 comments on commit 5a75395

Please sign in to comment.