Following our last post, we now have a solid framework for our app to handle state and lifecycle. However, at this point we are still navigating the app directly from the code-behind of the Views, which ties the navigation to the platform code. In addition to not cluttering up our code, this also restricts us from fully taking advantage of the cross-platform opportunities offered by MvvmLight.
Today we’ll see how to centralize this navigation code, removing the platform-specific definition and moving from the code-behind to the ViewModels, allowing maximum reuse of code. We’ll begin with the code related to navigation.
Read more on the Falafel Software Blogs: Windows 10 Development: MvvmLight NavigationService and the Behaviors SDK
We have so far created a simple app with two pages, that uses simple Frame navigation to go back and forth. However, the app is still missing one crucial feature: state management. When an app is suspended for whatever reason (such as being minimized on the desktop or navigated away from on the phone), it is up to the developer to maintain the current state so that it can be fully restored where the user left off.
In this post we’ll look at a simple way we can achieve this by leveraging helper classes from the Windows 8.1 project templates.
Read more at the Falafel Software Blogs: Windows 10 Development: Maintaining Application State>
So far we’ve setup a few pages with some design-time data to help us layout the app, but running it still yields a blank screen with no interaction possible. We’ll remedy this by loading the sample data at runtime and adding a simple navigation implementation to allow us to go back and forth between the pages.
Read more at the Falafel Software Blogs: Windows 10 Development: Adding Simple Navigation
In our last post, we installed the MVVM Light Toolkit and defined the basic framework for a simple two-page app with the MVVM pattern. With the ViewModels we created, we now have the containers for the data, but it would be even more helpful to pre-populate them with some sample data to aid in the designing of the app.
Read more at the Falafel Software Blogs: Windows 10 Development: Adding Design-Time Data with Blend
In the next few posts we’ll dive into the basics of using the MVVM Light Toolkit with Windows 10 to build a simple project two-page with the MVVM design pattern. Today we’ll show how to setup the toolkit in a Windows 10 project, and some of the basic components you’ll need to define to follow the MVVM pattern.
Read more at the Falafel Software Blogs: Using MVVM Light Toolkit with Windows 10: Getting Started