Reputation: 401
I have a PCL with view-models shared between WPF and Xamarin.Forms apps.
On Xamarin Forms I have the INavigationService, which works great. But I don't have something similar on WPF as far as I know.
Any ideas or quick examples how to have a cross platform navigation in the PCL (Portable class library)?
Upvotes: 0
Views: 154
Reputation:
First, I would never recommend sharing a WPF VM with a mobile VM, unless that WPF app is just your mobile app running on WPF, even then I would take a different approach. XF and WPF are vastly different and there is no common navigation paradigm you share across the platforms. If you must do this, simply create a base VM that has all the business logic, and then create a platform specific VM that derives from the base that would handle the platform navigation.
Upvotes: 3