Delphi Prism WPF Model View ViewModel Template

by John 7/3/2009 1:16:00 AM

 

I'm currently exploring WPF Futures. In particular I wanted to investigate the Model-View-ViewModel pattern, an example of which is provided as a project template from the download page.

Apparently this is the preferred pattern when developing WPF/Silverlight applications. It's worth googling "model view view model" to find interesting links regarding this.

Since its C# and I wanted to explore using Delphi Prism I decided to convert the provided template. I used the C# to Oxygene converter which can be found here. Considering the current download is marked as 0.2, it was a pretty painless job which required minimal code changes to the converted Oxygene code.

I have uploaded the source code to the template here . A Subversion client is required, I'm using TortoiseSVN.

Having downloaded the code you need to create a zip file containing the package. 

Assuming you had installed the templates into C:\develop\DelphiPrismTemplates, the 7Zip commandline from the C:\develop\DelphiPrismTemplates\WpfModelViewApplication\WpfModelViewApplication folder would be

7z.exe" a -r ..\WpfModelViewApplication.zip *

The resulting zip file then needs to be copied to the Oxygene Visual Studio project template directory, this is

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplates\Oxygene\Windows (WPF)\1033 

You then need to make Visual Studio aware of the new template, from the folder C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE, you can run the commandline devenv.exe /setup

Assuming everything worked ok, when you do a File New Project in Visual Studio you should have a WPF Model View Application project in the WPF section. This is shown in the screenshot below.

 

 

I used the template to follow a tutorial which can be found in the in the download from codeplex which can be found here. There a couple of documents included and they are informative.
 
The complete tutorial application can be found at CodeCentral at this location;
 
A screenshot of the running application is shown below
 
 
A word of warning, if you start an application using the template and run it unchanged, it doesn't display anything. Its worth looking at the supplied example, in particular app.xaml.pas to see what is being performed at startup. 

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Delphi Prism | WPF

Related posts

Comments

7/14/2009 6:29:25 PM

pingback

Pingback from answerspluto.com

list of links 3 « Answers Pluto

answerspluto.com

5/21/2010 2:48:03 PM

pingback

Pingback from 79.eumreborn.com

R500 Bumper Holiday, R500 Lamp Cree

79.eumreborn.com

Comments are closed

Powered by BlogEngine.NET 1.3.0.0
Theme by Mads Kristensen

About the author

Name of author John Moshakis
I'm a software developer living in Toronto..

E-mail me Send mail

Calendar

<<  July 2017  >>
MoTuWeThFrSaSu
262728293012
3456789
10111213141516
17181920212223
24252627282930
31123456

View posts in large calendar

Pages

    Recent posts

    Recent comments

    Authors

    Tags

    Don't show

      Disclaimer

      The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

      © Copyright 2017

      Sign in