Open DavidM29 opened 2 weeks ago
After investigation I have found out the problem is that Uno.Toolkit automatically applies the NativeFramePresenter
as the Frame
template. This does not fare well with the WinUI Frame
behavior, as that requires the Frame
to manage Page
instances and caching as compared to the frame presenter itself.
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:
<Frame Style="{StaticResource XamlDefaultFrame}" />
Or by creating an implicit style based on XamlDefaultFrame:
<Style TargetType="Frame" BasedOn="XamlDefaultFrame" />
Current behavior
Frame content does not render when setting
FeatureConfiguration.Frame.UseWinUIBehavior = true;
.Expected behavior
Content should get rendered.
How to reproduce it (as minimally and precisely as possible)
FeatureConfiguration.Frame.UseWinUIBehavior = true;
, Test Button is not visible.FeatureConfiguration.Frame.UseWinUIBehavior = true;
and the Test Button is visible.UnoApp1.zip
Workaround
Have not found any workarounds yet.
Works on UWP/WinUI
Yes
Environment
No response
NuGet package version(s)
No response
Affected platforms
Android
IDE
Visual Studio 2022
IDE version
17.11.4
Relevant plugins
No response
Anything else we need to know?
No response