Prism
Prism copied to clipboard
Adding support for DefaultView property
Description of Change
Aligns WPF & Uno Platform API with MAUI. Provides attached property for the default View. This could be an instance, type or name of the view that should be added when the View is initialized.
Bugs Fixed
- closes #3246
API Changes
Added:
<ContentControl prism:RegionManager.DefaultView="SomeView" />
This looks overly complicated to me. WPF already has a RegisterViewWithRegion method. The DefaultView attached property should simply rely on that API. The DefaultView property should accept a Type which is the parameter needed by the RegisterViewWithRegion, or it can accept a string. In the case of a string, we could check the View registry to get the type of the view.
There will be some limitations of it's use depending on the architecture of the modules in the app.