Skip to content

Commit

Permalink
docs: Additional docs for WinUI Frame behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Oct 14, 2024
1 parent 331fd9e commit 33e3c53
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/articles/controls/Frame.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,15 @@ 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.

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`:

```xml
<Frame Style="{StaticResource XamlDefaultFrame}" />
```

Or by creating an implicit style based on `XamlDefaultFrame`:

```xml
<Style TargetType="Frame" BasedOn="XamlDefaultFrame" />
```

0 comments on commit 33e3c53

Please sign in to comment.