Avoid qualified name in x:Type binding for Blazor Hybrid template #29005
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
Use an explicit XML namespace for Component, avoiding use qualified name syntax in the x:Type binding. Qualified names (like
local:Components.Routes
) aren't currently supported by XAML Hot Reload, producing the error"Nested types are not supported: Components.Routes" and causing XAML Hot Reload to not work. This support is coming in a future VS update, but for now it's best to avoid using of the qualified name syntax in our templates, to keep things broadly compatible and working for new users. We don't use qualified names in XAML bindings anywhere else in MAUI XAML templates; this is the last occurrence.
Issues Fixed
Fixes #20669