Skip to content

Commit

Permalink
chore: fix pivot displaying non-selected item content
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaoy312 committed Oct 7, 2024
1 parent 22dddc7 commit abdbee3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Uno.UI/UI/Xaml/Controls/Pivot/Pivot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Media;
using System.Collections.Specialized;

namespace Microsoft.UI.Xaml.Controls
{
Expand Down Expand Up @@ -73,6 +74,13 @@ protected override void OnApplyTemplate()
SynchronizeItems();
}

private protected override void UpdateItems(NotifyCollectionChangedEventArgs args)
{
base.UpdateItems(args);

SynchronizeSelectedItem();
}

private void UnregisterHeaderEvents()
{
if (_staticHeader != null)
Expand Down

0 comments on commit abdbee3

Please sign in to comment.