You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to implement the common ViewModel platform or idiom specific View use case and am having trouble with the platform specific View rendering as it should according to the documentation.
Steps to Reproduce
Create ViewAPage.xaml, ViewBPage.xaml view using add new item in IDE, ViewAPageViewModel & ViewBPageViewModel generated
Create ViewAPageTablet.xaml and ViewBPageAndroid.xaml
Register Views/ViewModels in the containerRegistry containerRegistry.RegisterForNavigationOnIdiom<ViewAPage, ViewAPageViewModel>(tabletView: typeof(ViewAPageTablet)); containerRegistry.RegisterForNavigationOnPlatform<ViewBPage, ViewBPageViewModel>(new Platform<ViewBPageAndroid>(RuntimePlatform.Android));
Expected Behavior
Expected the ViewBPage.xaml would render when running on an android simulator just as the ViewPageTablet.xaml rendered when running an iOS Tablet simulator
Actual Behavior
The default ViewBPage.xaml renders regardless of simulator OS.
dansiegel
changed the title
RegisterForNavigationOnPlatform not rendering platform specific view
RegisterForNavigationOnPlatform not Registers Default View instead of Platform View
Feb 19, 2019
This is confirmed. It appears that the current registration logic ends up registering the View twice resulting in the original default View type taking precedence.
Description
I'm attempting to implement the common ViewModel platform or idiom specific View use case and am having trouble with the platform specific View rendering as it should according to the documentation.
Steps to Reproduce
containerRegistry.RegisterForNavigationOnIdiom<ViewAPage, ViewAPageViewModel>(tabletView: typeof(ViewAPageTablet));
containerRegistry.RegisterForNavigationOnPlatform<ViewBPage, ViewBPageViewModel>(new Platform<ViewBPageAndroid>(RuntimePlatform.Android));
Expected Behavior
Expected the ViewBPage.xaml would render when running on an android simulator just as the ViewPageTablet.xaml rendered when running an iOS Tablet simulator
Actual Behavior
The default ViewBPage.xaml renders regardless of simulator OS.
Basic Information
Screenshots
Reproduction Link
Archive.zip
The text was updated successfully, but these errors were encountered: