Prism icon indicating copy to clipboard operation
Prism copied to clipboard

Adding support for DefaultView property

Open dansiegel opened this issue 1 year ago • 1 comments

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" />

dansiegel avatar Sep 06 '24 11:09 dansiegel

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.

brianlagunas avatar Sep 10 '24 16:09 brianlagunas