-
Notifications
You must be signed in to change notification settings - Fork 711
Fix Navigation for Native AOT with Source Generator #1627 #2095
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
base: main
Are you sure you want to change the base?
Conversation
|
Hi |
| "Items": [ | ||
| { | ||
| "UniqueId": "XamlResources", | ||
| "UniqueId": "WinUIGallery.ControlPages.XamlResourcesPage", |
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.
Why did we need to change the unique id for this?
| in the WinUI repo, or the next ItemGroup below when standalone. --> | ||
| <ItemGroup> | ||
| <PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.183"> | ||
| <PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.264"> |
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.
Intentional change?
|
Thank you for working on this, great job! General question, do we need to include the fully qualified type name? I think for simplicity we can get away with just having the type name itself as key instead of having to prepend "WinUIGallery..." everwhere. |
|
I have a few questions:
|
Add a source generator to automatically generate the
NavigationPageMappingsclass, which maps page types to unique IDs. This eliminates the need to use reflection, such asType.GetType(pageString). #1627Before:
After:
NavigationPageMappings.PageDictionary.TryGetValue(item.UniqueId, out Type? pageType);Description
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes