diff --git a/src/Avalonia.Controls/Panel.cs b/src/Avalonia.Controls/Panel.cs index 035e775af7..eff6603727 100644 --- a/src/Avalonia.Controls/Panel.cs +++ b/src/Avalonia.Controls/Panel.cs @@ -25,16 +25,6 @@ namespace Avalonia.Controls public static readonly StyledProperty BackgroundProperty = Border.BackgroundProperty.AddOwner(); - /// - /// Defines the property. - /// - public static readonly DirectProperty IsItemsHostProperty = - AvaloniaProperty.RegisterDirect( - nameof(IsItemsHost), - o => o.IsItemsHost, - (o, v) => o.IsItemsHost = v, - unsetValue: false); - /// /// Initializes static members of the class. /// @@ -43,7 +33,6 @@ namespace Avalonia.Controls AffectsRender(BackgroundProperty); } - private bool _isItemsHost; private EventHandler? _childIndexChanged; /// @@ -72,11 +61,7 @@ namespace Avalonia.Controls /// /// Gets whether the hosts the items created by an . /// - public bool IsItemsHost - { - get => _isItemsHost; - set => SetAndRaise(IsItemsHostProperty, ref _isItemsHost, value); - } + public bool IsItemsHost { get; internal set; } event EventHandler? IChildIndexProvider.ChildIndexChanged {