- follow the tutorial provided by Microsoft.
- follow the followup tutorial for linking views and view models, specifically the section titled "Creating the View Model Using a View Model Locator"
- setup auto-wiring for the container in this section of the tutorial.
- Ensure that you set the default ViewModel factory in the Bootstrapper.ConfigureContainer method: ViewModelLocationProvider.SetDefaultViewModelFactory(viewModelType => this.Container.Resolve(viewModelType));
Showing posts with label prism. Show all posts
Showing posts with label prism. Show all posts
Monday, September 01, 2014
Creating a WPF app with Microsoft Prism Framework 5
To get started, do the following:
Sunday, June 22, 2014
Converting an existing Windows Store app to using the Prism Framework
I began converting an existing Windows Store App to using the Prism Framework provided by Microsoft. However, I'm running into the following error:
The primary reference "Microsoft.Practices.Prism.StoreApps" could not be resolved because it was built against the ".NETCore,Version=v4.5.1" framework. This is a higher version than the currently targeted framework ".NETCore,Version=v4.5".
This post on stackoverflow.com recommends installing the Microsoft Build Tools 2013 package, which is available here:
http://www.microsoft.com/en-ca/download/details.aspx?id=40760
That didn't work.
I later realized that I had installed Prism with NuGet, so I went and checked the publishing dates on the versions. The latest (and default, which I had installed) was 1.1.0. The date on 1.0.1 was much older, and after reverting to that version, I was able to get my program to compile and run with a few modifications to the steps in this tutorial. The modifications are as follows:
The primary reference "Microsoft.Practices.Prism.StoreApps" could not be resolved because it was built against the ".NETCore,Version=v4.5.1" framework. This is a higher version than the currently targeted framework ".NETCore,Version=v4.5".
This post on stackoverflow.com recommends installing the Microsoft Build Tools 2013 package, which is available here:
http://www.microsoft.com/en-ca/download/details.aspx?id=40760
That didn't work.
I later realized that I had installed Prism with NuGet, so I went and checked the publishing dates on the versions. The latest (and default, which I had installed) was 1.1.0. The date on 1.0.1 was much older, and after reverting to that version, I was able to get my program to compile and run with a few modifications to the steps in this tutorial. The modifications are as follows:
- Change the return type of the App.OnLaunchApplication method to 'void' to match the 1.0.1 version of the Prism.StoreApps library.
- In the App.OnLaunchApplication method, ensure that there's a call to :
- NavigationService.Navigate("Main", null); where "Main" is the initial page name, and there's a MainPage class in your Views folder.
- Move the existing MainPage class into the Views folder in the root of the project.
Creating my first Windows 8 store app
As you may or may not be aware, there are multiple types of applications that can be created for Windows 8:
- Windows store apps, which use the new Metro interface
- Desktop-based apps which are like those created for previous versions of Windows that can still run in the Desktop app.
I'm quite familiar with creating WPF apps for Windows, but Metro apps are new, and those are what I'll be working on. With that in mind, Microsoft provides the Prism framework which helps provide additional classes, interfaces, events etc to help people develop Windows Store apps that keep consistent with Windows 8 design principles and help the apps perform properly. I'll be starting with the MSDN link here.
Subscribe to:
Posts (Atom)