diff --git a/doc/articles/controls/Frame.md b/doc/articles/controls/Frame.md index 66fbb354bc15..b96205186e02 100644 --- a/doc/articles/controls/Frame.md +++ b/doc/articles/controls/Frame.md @@ -11,7 +11,7 @@ uid: Uno.Controls.Frame ## Using Frame with Uno -To improve performance during navigation, `Frame` on Android, iOS, and WebAssembly targets operates in different way than in WinUI. Whereas WinUI follows `NavigationCacheMode` property on individual `Page` instances, on iOS and Android we keep the individual page instances in the back stack in memory by default. This way the can be quickly surfaced back to the user during back navigation. This behavior can be controlled using the `FeatureConfiguration.Frame.UseWinUIBehavior` property. This defaults to `true` on Skia targets and to `false` on Android, iOS and WebAssembly. +To improve performance during navigation, `Frame` on Android, iOS, and WebAssembly targets operates in different way than in WinUI. Whereas WinUI follows `NavigationCacheMode` property on individual `Page` instances, on iOS and Android we keep the individual page instances in the back stack in memory by default. This way they can be quickly surfaced back to the user during back navigation. This behavior can be controlled using the `FeatureConfiguration.Frame.UseWinUIBehavior` property. This defaults to `true` on Skia targets and to `false` on Android, iOS and WebAssembly. If you set `UseWinUIBehavior` to `true` on Android and iOS, you also need to override the default style for the control. You can do this by explicitly setting the `Style` to `XamlDefaultFrame`: diff --git a/src/Uno.UI/UI/Xaml/Controls/Frame/Frame.partial.mux.cs b/src/Uno.UI/UI/Xaml/Controls/Frame/Frame.partial.mux.cs index c30c39b88a0d..17939d179210 100644 --- a/src/Uno.UI/UI/Xaml/Controls/Frame/Frame.partial.mux.cs +++ b/src/Uno.UI/UI/Xaml/Controls/Frame/Frame.partial.mux.cs @@ -50,7 +50,7 @@ protected override void OnApplyTemplate() base.OnApplyTemplate(); #if HAS_UNO - if (this.TemplatedRoot?.GetType().Name?.Contains("NativeFramePresenter", StringComparison.Ordinal) == true) + if (_useWinUIBehavior && this.TemplatedRoot?.GetType().Name?.Contains("NativeFramePresenter", StringComparison.Ordinal) == true) { // It is not possible to use the WinUI behavior with a NativeFramePresenter. if (this.Log().IsEnabled(LogLevel.Error))