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 ..\ *

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


Delphi Prism | WPF

Related posts


7/15/2009 2:29:25 AM


Pingback from

list of links 3 « Answers Pluto

5/21/2010 10:48:03 PM


Pingback from

R500 Bumper Holiday, R500 Lamp Cree

Comments are closed

Powered by BlogEngine.NET
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


<<  August 2022  >>

View posts in large calendar


    Recent posts

    Recent comments



    Don't show


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

      © Copyright 2022

      Sign in