-
Notifications
You must be signed in to change notification settings - Fork 726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't allow mixing WinUI Frame behavior with native frame presenter #18460
base: master
Are you sure you want to change the base?
Conversation
// It is not possible to use the WinUI behavior with a NativeFramePresenter. | ||
if (this.Log().IsEnabled(LogLevel.Error)) | ||
{ | ||
this.Log().LogError("WinUI Frame behavior is not compatible with NativeFramePresenter. Set the Frame.Style to '{StaticResource XamlDefaultFrame}' instead."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we perhaps "undo" the feature flags for NatveFramePresenter if UseWinUIBehavior
for Frame
is set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The trouble here is that in case of the Toolkit NativeFramePresenter
I don't think they are set - the style coming from toolkit is set always irrespective of the flags, unless I missed something. If that is the case, then I think this solution will apply to both cases.
Secondly, you could mix WinUI and non-WinUI behavior frames in a single app (not sure why though 😀), in which case this hint may be better.
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-18460/index.html |
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-18460/index.html |
GitHub Issue (If applicable): closes #18401
PR Type
What kind of change does this PR introduce?
What is the current behavior?
When WinUI Frame behavior is used, content does not load correctly.
What is the new behavior?
Error log informs the user the mode is not compatible with
NativeFramePresenter
- usingGetType().Name
to handle both the internalNativeFramePresenter
as well as the one coming fromUno.Toolkit
.PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Run
results.Other information
Internal Issue (If applicable):