This repository was archived by the owner on May 1, 2024. It is now read-only.

Description
Description
Steps to Reproduce
- Use nested types in your XAML, like is done in https://github.com/microsoft/TailwindTraders-Mobile/blob/master/Source/TailwindTraders.Mobile/TailwindTraders.Mobile/Features/Product/Detail/ProductDetailPage.xaml with:
x:TypeArguments="local:ProductDetailViewModel, local:ProductDetailViewModel.State"
- Build and debug the app. Note that everything works.
- Make a change to the page using incremental Hot Reload. Note that you get the hot reload error (from the parser):
Nested types are not supported: ProductDetailModel.State
Expected Behavior
Discussed with @StephaneDelcroix and he said that nested types aren't intended to be support with Xaml. They can produce parsing ambiguities, which is the exact same reason that they aren't supported in WPF/UWP.
So, after discussing, we decided that the proper fix here is to give an error message on the Forms side when nested types are used in XAML so that users remove them from their apps. That will avoid any errors from parsing ambiguities, avoids hot reload related errors (where they don't work), and makes Forms XAML more consistent with WPF/UWP. We believe that few apps use nested types, and those that do would thus have to remove them when upgrading to Forms 5.0.
See also https://devdiv.visualstudio.com/DevDiv/_queries/edit/1180608
Basic Information