-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Region Support for Xamarin.Forms #2077
Conversation
7fe506f
to
90cdd78
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Out of Box adapters to support:
Unsupported Controls:
Development Note: The CollectionView Region Adapter is still part of this PR, however it has not been added to the RegionAdapterMappings due to the issues mentioned above. Once the issues have been resolved a follow up PR will add the support for CollectionView. |
/// </summary> | ||
/// <typeparam name="TView">The Type of <see cref="View"/> to register</typeparam> | ||
/// <param name="containerRegistry"><see cref="IContainerRegistry"/> used to register type for Navigation.</param> | ||
/// <param name="name">The unique name to register with the Page</param> |
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.
the view?
/// <typeparam name="TView">The Type of <see cref="View"/> to register</typeparam> | ||
/// <param name="containerRegistry"><see cref="IContainerRegistry"/> used to register type for Navigation.</param> | ||
/// <param name="name">The unique name to register with the Page</param> | ||
public static void RegisterForNavigation<TView>(this IContainerRegistry containerRegistry, string name = null) |
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.
rename to RegisterForRegionNavigation
/// </summary> | ||
/// <returns>A new instance of <see cref="AllActiveRegion"/>.</returns> | ||
protected override IRegion CreateRegion() => | ||
new AllActiveRegion(); |
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.
new region()?
throw new InvalidOperationException(Resources.LayoutViewHasChildrenException); | ||
} | ||
|
||
BindableLayout.SetItemsSource(regionTarget, region.ActiveViews); |
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.
should this be views?
/// </summary> | ||
/// <returns>A new instance of <see cref="AllActiveRegion"/>.</returns> | ||
protected override IRegion CreateRegion() => | ||
new AllActiveRegion(); |
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.
region?
/// </summary> | ||
/// <returns>A new instance of <see cref="SingleActiveRegion"/>.</returns> | ||
protected override IRegion CreateRegion() => | ||
new SingleActiveRegion(); |
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.
just region
SynchronizeRegionContext(); | ||
|
||
// Now register for events to keep them in sync | ||
HostControlRegionContext.PropertyChanged += RegionContextObservableObject_PropertyChanged; |
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.
let's look into this for memory leaks
Description of Change
Yep we're closing Prism's OLDEST open issue.... Support for Regions in Xamarin.Forms!
Bugs Fixed
API Changes
Too much to list... Suffice it to say we've taken Regions from Prism.Wpf and made some slight modifications for Xamarin.Forms.
Behavioral Changes
This changes Prism.DryIoc.Wpf & Prism.Unity.Wpf to no longer register their exceptions in the Bootstrapper/PrismApplication as this will now simply be done in the ContainerExtension instead...
PR Checklist