From 4124aa3aad46db5020c746e176fd829c12f16ad5 Mon Sep 17 00:00:00 2001 From: Shane Neuville Date: Sun, 28 Jul 2024 20:03:04 -0500 Subject: [PATCH 1/5] Page cache clearing --- src/Controls/src/Core/Shell/Shell.cs | 10 +++ src/Controls/src/Core/Shell/ShellContent.cs | 85 ++++++++++++++++-- .../Issues/Shell/ShellTransientTests.cs | 86 +++++++++++++++++++ 3 files changed, 176 insertions(+), 5 deletions(-) create mode 100644 src/Controls/tests/TestCases.HostApp/Issues/Shell/ShellTransientTests.cs diff --git a/src/Controls/src/Core/Shell/Shell.cs b/src/Controls/src/Core/Shell/Shell.cs index 4d4ea4b5e835..0bba1076081c 100644 --- a/src/Controls/src/Core/Shell/Shell.cs +++ b/src/Controls/src/Core/Shell/Shell.cs @@ -1634,8 +1634,18 @@ protected virtual void OnNavigating(ShellNavigatingEventArgs args) static void OnCurrentItemChanged(BindableObject bindable, object oldValue, object newValue) { if (oldValue is ShellItem oldShellItem) + { oldShellItem.SendDisappearing(); + foreach(var section in oldShellItem.Items) + { + foreach(var content in section.Items) + { + content.EvaluateDisconnect(); + } + } + } + if (newValue == null) return; diff --git a/src/Controls/src/Core/Shell/ShellContent.cs b/src/Controls/src/Core/Shell/ShellContent.cs index bf59e4901f69..08f60c35349d 100644 --- a/src/Controls/src/Core/Shell/ShellContent.cs +++ b/src/Controls/src/Core/Shell/ShellContent.cs @@ -5,6 +5,7 @@ using System.Collections.Specialized; using System.ComponentModel; using System.Reflection; +using System.Security.Cryptography; using Microsoft.Maui.Controls.Internals; namespace Microsoft.Maui.Controls @@ -54,6 +55,7 @@ public DataTemplate ContentTemplate EventHandler _isPageVisibleChanged; event EventHandler IShellContentController.IsPageVisibleChanged { add => _isPageVisibleChanged += value; remove => _isPageVisibleChanged -= value; } + bool _createdViaService; Page IShellContentController.GetOrCreateContent() { var template = ContentTemplate; @@ -74,11 +76,19 @@ Page IShellContentController.GetOrCreateContent() var services = Parent?.FindMauiContext()?.Services; if (services is not null) { - return Extensions.DependencyInjection.ActivatorUtilities.GetServiceOrCreateInstance(services, template.Type); + var result = services.GetService(template.Type); + if (result is not null) + { + _createdViaService = true; + return result; + } } - return Activator.CreateInstance(template.Type); + + _createdViaService = false; + return Extensions.DependencyInjection.ActivatorUtilities.CreateInstance(services, template.Type); }; } + result = ContentCache ?? (Page)template.CreateContent(content, this); ContentCache = result; } @@ -108,7 +118,10 @@ void IShellContentController.RecyclePage(Page page) Page _contentCache; /// - public ShellContent() => ((INotifyCollectionChanged)MenuItems).CollectionChanged += MenuItemsCollectionChanged; + public ShellContent() + { + ((INotifyCollectionChanged)MenuItems).CollectionChanged += MenuItemsCollectionChanged; + } internal bool IsVisibleContent => Parent is ShellSection shellSection && shellSection.IsVisibleSection && shellSection.CurrentItem == this; @@ -187,18 +200,79 @@ Page ContentCache var oldCache = _contentCache; _contentCache = value; if (oldCache != null) + { RemoveLogicalChild(oldCache); + oldCache.Unloaded -= OnPageUnloaded; + } - if (value != null && value.Parent != this) + if (value is not null && value.Parent != this) { AddLogicalChild(value); + + if (_createdViaService) + { + value.Unloaded += OnPageUnloaded; + } } - if (Parent != null) + if (Parent is not null) + { ((ShellSection)Parent).UpdateDisplayedPage(); + } } } + internal void EvaluateDisconnect() + { + if(!_createdViaService) + return; + + // If the user has set the IsVisible property on this shell content to false + bool disconnect = true; + + if(Parent is ShellSection shellSection && + shellSection.Parent is ShellItem shellItem && + shellItem.Parent is Shell shell) + { + disconnect = + !this.IsVisible || // user has set the IsVisible property to false + (_contentCache is not null && !_contentCache.IsVisible) || // user has set IsVisible on the Page to false + shell.CurrentItem != shellItem || // user has navigated to a different TabBar or a different FlyoutItem + !shellSection.IsVisible || // user has set IsVisible on the ShellSection to false + this.Window is null; // user has set the main page to a different shell instance + } + + if (!disconnect) + { + return; + } + + if (_contentCache is not null) + { + RemoveLogicalChild(_contentCache); + _contentCache.Unloaded -= OnPageUnloaded; + } + + _contentCache = null; + } + +#pragma warning disable RS0016 // Add public types and members to the declared API + protected override void OnPropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) +#pragma warning restore RS0016 // Add public types and members to the declared API + { + base.OnPropertyChanged(propertyName); + + if (propertyName == WindowProperty.PropertyName) + { + if(_contentCache?.IsLoaded == true) + return; + + EvaluateDisconnect(); + } + } + + void OnPageUnloaded(object sender, EventArgs e) => EvaluateDisconnect(); + public static implicit operator ShellContent(TemplatedPage page) { if (page.Parent != null) @@ -223,6 +297,7 @@ public static implicit operator ShellContent(TemplatedPage page) static void OnContentChanged(BindableObject bindable, object oldValue, object newValue) { var shellContent = (ShellContent)bindable; + shellContent._createdViaService = false; // This check is wrong but will work for testing if (shellContent.ContentTemplate == null) { diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Shell/ShellTransientTests.cs b/src/Controls/tests/TestCases.HostApp/Issues/Shell/ShellTransientTests.cs new file mode 100644 index 000000000000..8cfa1537b6a5 --- /dev/null +++ b/src/Controls/tests/TestCases.HostApp/Issues/Shell/ShellTransientTests.cs @@ -0,0 +1,86 @@ +using System; +using System.Diagnostics; +using Microsoft.Maui.Controls; + +namespace Maui.Controls.Sample.Issues +{ + [Issue(IssueTracker.None, 0, "Navigating Between Transient Shell States Recreates Pages")] + public class ShellTransientTests : Shell + { + List _contentPages = new List(); + protected override void OnNavigated(ShellNavigatedEventArgs args) + { + base.OnNavigated(args); + + if (_contentPages.Contains(this.CurrentPage)) + { + (CurrentPage as ContentPage).Content = new VerticalStackLayout() + { + Children = + { + new Label { Text = "Test Failed I am not a new page", AutomationId = "Failure" } + } + }; + } + else + { + (CurrentPage as ContentPage).Content = new VerticalStackLayout() + { + Children = + { + new Label { Text = "I am a new page", AutomationId = "Success" } + } + }; + } + + _contentPages.Add((ContentPage)this.CurrentPage); + } + + public ShellTransientTests() + { + var shellContent1 = new ShellContent() + { + ContentTemplate = new DataTemplate(typeof(TransientPage)) + }; + + + var shellContent2 = new ShellContent() + { + ContentTemplate = new DataTemplate(typeof(TransientPage)) + }; + + var shellContent3 = new ShellContent() + { + ContentTemplate = new DataTemplate(typeof(ContentPage)) + }; + + Items.Add(new FlyoutItem() + { + Title = "Flyout Item 1", + Items = + { + shellContent1 + } + }); + + Items.Add(new FlyoutItem() + { + Title = "Flyout Item 2", + Items = + { + shellContent2 + } + }); + + + Items.Add(new FlyoutItem() + { + Title = "Flyout Item 3", + Items = + { + shellContent3 + } + }); + } + } +} \ No newline at end of file From 6b244293155dce8e9973cc91c1d32eefa1ddc9d0 Mon Sep 17 00:00:00 2001 From: Shane Neuville Date: Mon, 29 Jul 2024 11:21:38 -0500 Subject: [PATCH 2/5] - add tests and fix failures --- .../ShellFlyoutTemplatedContentRenderer.cs | 8 ++ src/Controls/src/Core/Shell/ShellContent.cs | 2 +- .../Issues/Shell/ShellTransientTests.cs | 77 ++++++++++++++++--- .../tests/TestCases.HostApp/MauiProgram.cs | 2 + .../tests/TestCases.HostApp/ScopedPage.cs | 15 ++++ .../tests/TestCases.HostApp/TransientPage.cs | 15 ++++ .../Tests/Issues/Shell/ShellTransientTests.cs | 70 +++++++++++++++++ 7 files changed, 176 insertions(+), 13 deletions(-) create mode 100644 src/Controls/tests/TestCases.HostApp/ScopedPage.cs create mode 100644 src/Controls/tests/TestCases.HostApp/TransientPage.cs create mode 100644 src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Shell/ShellTransientTests.cs diff --git a/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellFlyoutTemplatedContentRenderer.cs b/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellFlyoutTemplatedContentRenderer.cs index 484e884f1969..f406502cee56 100644 --- a/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellFlyoutTemplatedContentRenderer.cs +++ b/src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellFlyoutTemplatedContentRenderer.cs @@ -127,6 +127,14 @@ protected virtual void LoadView(IShellContext shellContext) void InitialLoad(GenericGlobalLayoutListener listener, AView view) { + // This means the handler was disconnected before the flyout was loaded + if (_shellContext?.Shell is null) + { + listener.Invalidate(); + sfl.LayoutChanging -= OnFlyoutViewLayoutChanging; + return; + } + OnFlyoutViewLayoutChanging(); if (_flyoutContentView == null || ggll == null) diff --git a/src/Controls/src/Core/Shell/ShellContent.cs b/src/Controls/src/Core/Shell/ShellContent.cs index 08f60c35349d..152517a91ae3 100644 --- a/src/Controls/src/Core/Shell/ShellContent.cs +++ b/src/Controls/src/Core/Shell/ShellContent.cs @@ -249,8 +249,8 @@ shellSection.Parent is ShellItem shellItem && if (_contentCache is not null) { - RemoveLogicalChild(_contentCache); _contentCache.Unloaded -= OnPageUnloaded; + RemoveLogicalChild(_contentCache); } _contentCache = null; diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Shell/ShellTransientTests.cs b/src/Controls/tests/TestCases.HostApp/Issues/Shell/ShellTransientTests.cs index 8cfa1537b6a5..d29293e4311e 100644 --- a/src/Controls/tests/TestCases.HostApp/Issues/Shell/ShellTransientTests.cs +++ b/src/Controls/tests/TestCases.HostApp/Issues/Shell/ShellTransientTests.cs @@ -4,13 +4,60 @@ namespace Maui.Controls.Sample.Issues { - [Issue(IssueTracker.None, 0, "Navigating Between Transient Shell States Recreates Pages")] + [Issue(IssueTracker.None, 0, "Validate Basic Service Lifetime Behavior On Shell")] public class ShellTransientTests : Shell { - List _contentPages = new List(); + static List _contentPages = new List(); protected override void OnNavigated(ShellNavigatedEventArgs args) { base.OnNavigated(args); + LoadCurrentPage(); + } + + void LoadCurrentPage() + { + var navigatetoTransientPage = new Button + { + Text = "Navigate to transient page", + AutomationId = "NavigateToTransientPage", + Command = new Command(() => + { + ((ContentPage)this.CurrentPage).Content = new Label(){ Text = "Navigating. If you tried to navigate to the same page type, you'll be stuck here."}; + this.CurrentItem = Items[0]; + }) + }; + + var navigateToNotRegisteredPage = new Button + { + Text = "Navigate to Unregistered page", + AutomationId = "NavigateToUnregisteredPage", + Command = new Command(() => + { + ((ContentPage)this.CurrentPage).Content = new Label(){ Text = "Navigating. If you tried to navigate to the same page type, you'll be stuck here."}; + this.CurrentItem = Items[1]; + }) + }; + + var navigateToScopedPage = new Button + { + Text = "Navigate to scoped page", + AutomationId = "NavigateToScopedPage", + Command = new Command(() => + { + ((ContentPage)this.CurrentPage).Content = new Label(){ Text = "Navigating. If you tried to navigate to the same page type, you'll be stuck here."}; + this.CurrentItem = Items[2]; + }) + }; + + var navigateToNewShell = new Button + { + Text = "Navigate to New Shell", + AutomationId = "NavigateToNewShell", + Command = new Command(() => + { + this.Window.Page = new ShellTransientTests(); + }) + }; if (_contentPages.Contains(this.CurrentPage)) { @@ -18,7 +65,11 @@ protected override void OnNavigated(ShellNavigatedEventArgs args) { Children = { - new Label { Text = "Test Failed I am not a new page", AutomationId = "Failure" } + navigatetoTransientPage, + navigateToNotRegisteredPage, + navigateToScopedPage, + navigateToNewShell, + new Label { Text = "I am not a new page", AutomationId = "OldPage" } } }; } @@ -28,13 +79,17 @@ protected override void OnNavigated(ShellNavigatedEventArgs args) { Children = { - new Label { Text = "I am a new page", AutomationId = "Success" } + navigatetoTransientPage, + navigateToNotRegisteredPage, + navigateToScopedPage, + navigateToNewShell, + new Label { Text = "I am a new page", AutomationId = "NewPage" } } }; } _contentPages.Add((ContentPage)this.CurrentPage); - } + } public ShellTransientTests() { @@ -43,20 +98,19 @@ public ShellTransientTests() ContentTemplate = new DataTemplate(typeof(TransientPage)) }; - var shellContent2 = new ShellContent() { - ContentTemplate = new DataTemplate(typeof(TransientPage)) + ContentTemplate = new DataTemplate(typeof(ContentPage)) }; var shellContent3 = new ShellContent() { - ContentTemplate = new DataTemplate(typeof(ContentPage)) + ContentTemplate = new DataTemplate(typeof(ScopedPage)) }; Items.Add(new FlyoutItem() { - Title = "Flyout Item 1", + Title = "Transient Page", Items = { shellContent1 @@ -65,17 +119,16 @@ public ShellTransientTests() Items.Add(new FlyoutItem() { - Title = "Flyout Item 2", + Title = "Not Registered Page", Items = { shellContent2 } }); - Items.Add(new FlyoutItem() { - Title = "Flyout Item 3", + Title = "Scoped Page", Items = { shellContent3 diff --git a/src/Controls/tests/TestCases.HostApp/MauiProgram.cs b/src/Controls/tests/TestCases.HostApp/MauiProgram.cs index c22c2bd8a985..120584617c03 100644 --- a/src/Controls/tests/TestCases.HostApp/MauiProgram.cs +++ b/src/Controls/tests/TestCases.HostApp/MauiProgram.cs @@ -25,6 +25,8 @@ public static MauiApp CreateMauiApp() }) .Issue21109AddMappers(); + appBuilder.Services.AddTransient(); + appBuilder.Services.AddScoped(); return appBuilder.Build(); } } diff --git a/src/Controls/tests/TestCases.HostApp/ScopedPage.cs b/src/Controls/tests/TestCases.HostApp/ScopedPage.cs new file mode 100644 index 000000000000..ea084bf25e38 --- /dev/null +++ b/src/Controls/tests/TestCases.HostApp/ScopedPage.cs @@ -0,0 +1,15 @@ + +namespace Maui.Controls.Sample; + +public class ScopedPage : ContentPage +{ + static int i = 0; + public ScopedPage() + { + Index = i; + Content = new Label { Text = $"I'm a scoped page: {Index}" }; + i++; + } + + public int Index {get; private set;} +} \ No newline at end of file diff --git a/src/Controls/tests/TestCases.HostApp/TransientPage.cs b/src/Controls/tests/TestCases.HostApp/TransientPage.cs new file mode 100644 index 000000000000..07822689bb16 --- /dev/null +++ b/src/Controls/tests/TestCases.HostApp/TransientPage.cs @@ -0,0 +1,15 @@ + +namespace Maui.Controls.Sample; + +public class TransientPage : ContentPage +{ + static int i = 0; + public TransientPage() + { + Index = i; + Content = new Label { Text = $"I'm a transient page: {Index}" }; + i++; + } + + public int Index {get; private set;} +} \ No newline at end of file diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Shell/ShellTransientTests.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Shell/ShellTransientTests.cs new file mode 100644 index 000000000000..3be0cb734913 --- /dev/null +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Shell/ShellTransientTests.cs @@ -0,0 +1,70 @@ +using Microsoft.Maui.TestCases.Tests; +using NUnit.Framework; +using NUnit.Framework.Legacy; +using UITest.Appium; +using UITest.Core; + +namespace Microsoft.Maui.TestCases.Tests.Issues +{ + public partial class ShellTransientTests : _IssuesUITest + { + public ShellTransientTests(TestDevice device) : base(device) { } + + public override string Issue => "Validate Basic Service Lifetime Behavior On Shell"; + + protected override bool ResetAfterEachTest => true; + + [Test] + [Category(UITestCategories.Shell)] + public void ValidateBasicServiceLifetimePageBehavior() + { + // Navigate to Transient Page for the First time + App.WaitForElement("NewPage"); + + // Navigate to Unregistered Page + App.WaitForElement("NavigateToUnregisteredPage"); + App.Tap("NavigateToUnregisteredPage"); + App.WaitForElement("NewPage", "New Page Not Created For Initial Navigation to Unregistered Page"); + + // Navigate to Scoped Page for the First time + App.WaitForElement("NavigateToScopedPage"); + App.Tap("NavigateToScopedPage"); + App.WaitForElement("NewPage", "New Page Not Created For Initial Navigation to Scoped Page"); + + // Navigate to Transient Page for the Second time + App.WaitForElement("NavigateToTransientPage"); + App.Tap("NavigateToTransientPage"); + App.WaitForElement("NewPage", "New Page Not Created For Second Navigation To Transient Page"); + + // Navigate to Transient Page for the Second time + App.WaitForElement("NavigateToScopedPage"); + App.Tap("NavigateToScopedPage"); + App.WaitForElement("OldPage", "New Page Incorrectly Created For Scoped Page"); + + // Navigate to Unregistered Page + App.WaitForElement("NavigateToUnregisteredPage"); + App.Tap("NavigateToUnregisteredPage"); + App.WaitForElement("OldPage", "New Page Incorrectly Created For Unregistered Page"); + } + + [Test] + [Category(UITestCategories.Shell)] + public void SwappingShellInstancesRecreatesPages() + { + // Navigate to Scoped Page so we can test that it's resued in Swapped Shell + App.WaitForElement("NavigateToScopedPage"); + App.Tap("NavigateToScopedPage"); + App.WaitForElement("NewPage", "New Page Not Created For Initial Navigation to Scoped Page"); + + // Verify New Page Created for Transient Page + App.WaitForElement("NewPage"); + App.Tap("NavigateToNewShell"); + App.WaitForElement("NewPage"); + + // Navigate to Scoped Page on Second Shell + App.WaitForElement("NavigateToScopedPage"); + App.Tap("NavigateToScopedPage"); + App.WaitForElement("OldPage", "New Page Incorrectly Created For Scoped Page"); + } + } +} \ No newline at end of file From 49eb5bcd57cb1d9b32c27977efec9b222fee89ff Mon Sep 17 00:00:00 2001 From: Shane Neuville Date: Mon, 29 Jul 2024 16:38:26 -0500 Subject: [PATCH 3/5] - remove extra tests --- .../Tests/ScrollViewUITests.cs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/ScrollViewUITests.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/ScrollViewUITests.cs index e159d6989467..8b637f7de862 100644 --- a/src/Controls/tests/TestCases.Shared.Tests/Tests/ScrollViewUITests.cs +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/ScrollViewUITests.cs @@ -20,8 +20,12 @@ protected override void FixtureSetup() App.NavigateToGallery(LayoutGallery); } +#if ANDROID [Test] [Description("Scroll element to the start")] + [FailsOnIOS("This test is failing, likely due to product issue")] + [FailsOnMac("This test is failing, likely due to product issue")] + [FailsOnWindows("This test is failing, likely due to product issue")] public void ScrollToElement1Start() { if (Device == TestDevice.Android) @@ -43,6 +47,9 @@ public void ScrollToElement1Start() [Test] [Description("Scroll element to the center")] + [FailsOnIOS("This test is failing, likely due to product issue")] + [FailsOnMac("This test is failing, likely due to product issue")] + [FailsOnWindows("This test is failing, likely due to product issue")] public void ScrollToElement2Center() { if (Device == TestDevice.Android) @@ -67,6 +74,9 @@ public void ScrollToElement2Center() [Test] [Description("Scroll element to the end")] + [FailsOnIOS("This test is failing, likely due to product issue")] + [FailsOnMac("This test is failing, likely due to product issue")] + [FailsOnWindows("This test is failing, likely due to product issue")] public void ScrollToElement3End() { if (Device == TestDevice.Android) @@ -88,6 +98,9 @@ public void ScrollToElement3End() [Test] [Description("ScrollTo Y = 100")] + [FailsOnIOS("This test is failing, likely due to product issue")] + [FailsOnMac("This test is failing, likely due to product issue")] + [FailsOnWindows("This test is failing, likely due to product issue")] public void ScrollToY() { if (Device == TestDevice.Android) @@ -106,6 +119,9 @@ public void ScrollToY() // ScrollToYTwice (src\Compatibility\ControlGallery\src\UITests.Shared\Tests\ScrollViewUITests.cs) [Test] [Description("ScrollTo Y = 100")] + [FailsOnIOS("This test is failing, likely due to product issue")] + [FailsOnMac("This test is failing, likely due to product issue")] + [FailsOnWindows("This test is failing, likely due to product issue")] public void ScrollToYTwice() { if (Device == TestDevice.Android) @@ -125,9 +141,13 @@ public void ScrollToYTwice() Assert.Ignore("This test is failing, likely due to product issue"); } } +#endif + #if ANDROID || IOS [Test] [Description("Scroll down the ScrollView using a gesture")] + [FailsOnMac("This test is failing, likely due to product issue")] + [FailsOnWindows("This test is failing, likely due to product issue")] public void ScrollUpAndDownWithGestures() { App.ScrollDown("thescroller", ScrollStrategy.Gesture, 0.75); From cd724636e8924879a890ab0e50e8d65f6bccc785 Mon Sep 17 00:00:00 2001 From: Shane Neuville Date: Tue, 30 Jul 2024 09:36:06 -0500 Subject: [PATCH 4/5] Update ShellContent.cs --- src/Controls/src/Core/Shell/ShellContent.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Controls/src/Core/Shell/ShellContent.cs b/src/Controls/src/Core/Shell/ShellContent.cs index 152517a91ae3..e23344586d5f 100644 --- a/src/Controls/src/Core/Shell/ShellContent.cs +++ b/src/Controls/src/Core/Shell/ShellContent.cs @@ -5,7 +5,6 @@ using System.Collections.Specialized; using System.ComponentModel; using System.Reflection; -using System.Security.Cryptography; using Microsoft.Maui.Controls.Internals; namespace Microsoft.Maui.Controls From b88426c178c3df0df1c03adc7e39528d2db78d68 Mon Sep 17 00:00:00 2001 From: Shane Neuville Date: Tue, 30 Jul 2024 10:34:13 -0500 Subject: [PATCH 5/5] - fix apis --- .../src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt | 1 + src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt | 1 + .../src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt | 1 + .../src/Core/PublicAPI/net-tizen/PublicAPI.Unshipped.txt | 1 + .../src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt | 1 + src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt | 1 + .../src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txt | 1 + src/Controls/src/Core/Shell/ShellContent.cs | 2 -- 8 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt index 1ed74c8ea38d..f932838571ca 100644 --- a/src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt @@ -347,6 +347,7 @@ static Microsoft.Maui.Controls.Binding.Create(System.Func Microsoft.Maui.IPropertyMapper *REMOVED*static Microsoft.Maui.Controls.FlyoutPage.ControlsFlyoutPageMapper -> Microsoft.Maui.IPropertyMapper! *REMOVED*static Microsoft.Maui.Controls.Toolbar.ControlsToolbarMapper -> Microsoft.Maui.IPropertyMapper! +~override Microsoft.Maui.Controls.ShellContent.OnPropertyChanged(string propertyName = null) -> void Microsoft.Maui.Controls.Embedding.EmbeddingExtensions static Microsoft.Maui.Controls.Embedding.EmbeddingExtensions.CreateEmbeddedWindowContext(this Microsoft.Maui.Hosting.MauiApp! mauiApp, Android.App.Activity! platformWindow) -> Microsoft.Maui.IMauiContext! static Microsoft.Maui.Controls.Embedding.EmbeddingExtensions.ToPlatformEmbedded(this Microsoft.Maui.IElement! element, Microsoft.Maui.IMauiContext! context) -> Android.Views.View! diff --git a/src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt index 8bc1bbf40080..c3071e68cdaf 100644 --- a/src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt @@ -240,6 +240,7 @@ override Microsoft.Maui.Controls.SearchBar.IsEnabledCore.get -> bool ~Microsoft.Maui.Controls.WebView.UserAgent.set -> void ~override Microsoft.Maui.Controls.Region.Equals(object obj) -> bool ~override Microsoft.Maui.Controls.Shapes.Matrix.Equals(object obj) -> bool +~override Microsoft.Maui.Controls.ShellContent.OnPropertyChanged(string propertyName = null) -> void ~static Microsoft.Maui.Controls.Region.FromRectangles(System.Collections.Generic.IEnumerable rectangles) -> Microsoft.Maui.Controls.Region ~static readonly Microsoft.Maui.Controls.InputView.CursorPositionProperty -> Microsoft.Maui.Controls.BindableProperty ~static readonly Microsoft.Maui.Controls.InputView.FontAttributesProperty -> Microsoft.Maui.Controls.BindableProperty diff --git a/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt index 7be9e3592959..7f3c0793d953 100644 --- a/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt @@ -370,6 +370,7 @@ static Microsoft.Maui.Controls.Binding.Create(System.Func Microsoft.Maui.IPropertyMapper *REMOVED*static Microsoft.Maui.Controls.FlyoutPage.ControlsFlyoutPageMapper -> Microsoft.Maui.IPropertyMapper! *REMOVED*static Microsoft.Maui.Controls.Toolbar.ControlsToolbarMapper -> Microsoft.Maui.IPropertyMapper! +~override Microsoft.Maui.Controls.ShellContent.OnPropertyChanged(string propertyName = null) -> void Microsoft.Maui.Controls.Embedding.EmbeddingExtensions static Microsoft.Maui.Controls.Embedding.EmbeddingExtensions.CreateEmbeddedWindowContext(this Microsoft.Maui.Hosting.MauiApp! mauiApp, UIKit.UIWindow! platformWindow) -> Microsoft.Maui.IMauiContext! static Microsoft.Maui.Controls.Embedding.EmbeddingExtensions.ToPlatformEmbedded(this Microsoft.Maui.IElement! element, Microsoft.Maui.IMauiContext! context) -> UIKit.UIView! diff --git a/src/Controls/src/Core/PublicAPI/net-tizen/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/net-tizen/PublicAPI.Unshipped.txt index 9715599c7496..639273194450 100644 --- a/src/Controls/src/Core/PublicAPI/net-tizen/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/net-tizen/PublicAPI.Unshipped.txt @@ -318,3 +318,4 @@ Microsoft.Maui.Controls.WebViewProcessTerminatedEventArgs Microsoft.Maui.Controls.WebViewProcessTerminatedEventArgs.WebViewProcessTerminatedEventArgs() -> void Microsoft.Maui.Controls.PlatformWebViewProcessTerminatedEventArgs Microsoft.Maui.Controls.PlatformWebViewProcessTerminatedEventArgs.PlatformWebViewProcessTerminatedEventArgs() -> void +~override Microsoft.Maui.Controls.ShellContent.OnPropertyChanged(string propertyName = null) -> void \ No newline at end of file diff --git a/src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt index e5caae338271..c79ee42f7d61 100644 --- a/src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt @@ -357,6 +357,7 @@ static Microsoft.Maui.Controls.Binding.Create(System.Func Microsoft.Maui.IPropertyMapper *REMOVED*static Microsoft.Maui.Controls.FlyoutPage.ControlsFlyoutPageMapper -> Microsoft.Maui.IPropertyMapper! *REMOVED*static Microsoft.Maui.Controls.Toolbar.ControlsToolbarMapper -> Microsoft.Maui.IPropertyMapper! +~override Microsoft.Maui.Controls.ShellContent.OnPropertyChanged(string propertyName = null) -> void Microsoft.Maui.Controls.Embedding.EmbeddingExtensions static Microsoft.Maui.Controls.Embedding.EmbeddingExtensions.CreateEmbeddedWindowContext(this Microsoft.Maui.Hosting.MauiApp! mauiApp, Microsoft.UI.Xaml.Window! platformWindow) -> Microsoft.Maui.IMauiContext! static Microsoft.Maui.Controls.Embedding.EmbeddingExtensions.ToPlatformEmbedded(this Microsoft.Maui.IElement! element, Microsoft.Maui.IMauiContext! context) -> Microsoft.UI.Xaml.FrameworkElement! diff --git a/src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt index d0eb233bdfc8..8a60bb0b7ed6 100644 --- a/src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt @@ -315,3 +315,4 @@ static Microsoft.Maui.Controls.Binding.Create(System.Func Microsoft.Maui.IPropertyMapper *REMOVED*static Microsoft.Maui.Controls.FlyoutPage.ControlsFlyoutPageMapper -> Microsoft.Maui.IPropertyMapper! *REMOVED*static Microsoft.Maui.Controls.Toolbar.ControlsToolbarMapper -> Microsoft.Maui.IPropertyMapper! +~override Microsoft.Maui.Controls.ShellContent.OnPropertyChanged(string propertyName = null) -> void \ No newline at end of file diff --git a/src/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txt b/src/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txt index 58c218f9f641..945065b29369 100644 --- a/src/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txt +++ b/src/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txt @@ -315,3 +315,4 @@ static Microsoft.Maui.Controls.Binding.Create(System.Func Microsoft.Maui.IPropertyMapper *REMOVED*static Microsoft.Maui.Controls.FlyoutPage.ControlsFlyoutPageMapper -> Microsoft.Maui.IPropertyMapper! *REMOVED*static Microsoft.Maui.Controls.Toolbar.ControlsToolbarMapper -> Microsoft.Maui.IPropertyMapper! +~override Microsoft.Maui.Controls.ShellContent.OnPropertyChanged(string propertyName = null) -> void \ No newline at end of file diff --git a/src/Controls/src/Core/Shell/ShellContent.cs b/src/Controls/src/Core/Shell/ShellContent.cs index e23344586d5f..ec3c91ba1007 100644 --- a/src/Controls/src/Core/Shell/ShellContent.cs +++ b/src/Controls/src/Core/Shell/ShellContent.cs @@ -255,9 +255,7 @@ shellSection.Parent is ShellItem shellItem && _contentCache = null; } -#pragma warning disable RS0016 // Add public types and members to the declared API protected override void OnPropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) -#pragma warning restore RS0016 // Add public types and members to the declared API { base.OnPropertyChanged(propertyName);