Browse Source
Having a separate subscription to `Items.CollectionChanged` in both `ItemsControl` and `ItemsPresenter` meant that the `ItemsPresenter` sometimes doesn't update itself in time for a selection change, resulting in #3148. Make `ItemsControl` trigger `ItemsPresenter.ItemsChanged` rather than both controls listening to the event separately.pull/3177/head
4 changed files with 34 additions and 8 deletions
@ -1,12 +1,16 @@ |
|||
// Copyright (c) The Avalonia Project. All rights reserved.
|
|||
// Licensed under the MIT license. See licence.md file in the project root for full license information.
|
|||
|
|||
using System.Collections.Specialized; |
|||
|
|||
namespace Avalonia.Controls.Presenters |
|||
{ |
|||
public interface IItemsPresenter : IPresenter |
|||
{ |
|||
IPanel Panel { get; } |
|||
|
|||
void ItemsChanged(NotifyCollectionChangedEventArgs e); |
|||
|
|||
void ScrollIntoView(object item); |
|||
} |
|||
} |
|||
|
|||
Loading…
Reference in new issue