Sunday, November 30, 2014

Evolution of the F# Empty WPF Template

Back in March 2012, I announced that the F# Empty WPF project template had been enhanced to include a type provider from the FSharpx type providers collection. Today, another evolution of the F# Empty WPF template has occurred. The FSharpx.TypeProviders.Xaml type provider has been replaced with Reed Copsey's FsXaml for WPF type provider.

Building a Simple Example:

It's very easy to get started with the latest version of the template as well as FsXaml. Here the steps to create an overly simple example with the new version of the template, FxXaml and FSharp.ViewModule.Core (which is also inclueded in the template):

1. Create a new project with the latest version of the F# Empty Windows App (WPF) template.
2. Build the project and Enable the type provider when requested to do so. You can now run the project, which at this point simply displays a blank screen.
3. Open the MainWindow.xaml.fs file and replace the contents with the following:

4. Open the MainWindow.xaml file add the following to the Grid element:

After this change, the MainWindow.xaml file will look something like the following with one small different depending on what you named your project:

For additional examples checkout the demos in the FsXaml GitHub repo.


  1. Thanks! However, the message "Input string was not in a correct format" seems to have reappeared. Changing the region settings to "English (US)" helped.

  2. I was really impressed by reading this blog. We are also giving all software Course Online Training. The Hadoop Training in Chennai is one of the reputed Training institute in Chennai. They give professional and real time training for all students.

  3. This is really nice... very nice job and thanks for this.

  4. Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing. Android training in chennai | Android training chennai |Android course in chennai | Android course chennai

  5. IEEE Final Year Project centers make amazing deep learning final year projects ideas for final year students Final Year Projects for CSE to training and develop their deep learning experience and talents.

    IEEE Final Year projects Project Centers in India are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation.

    corporate training in chennai corporate training in chennai

    corporate training companies in india corporate training companies in india

    corporate training companies in chennai corporate training companies in chennai

    I have read your blog its very attractive and impressive. I like it your blog. Digital Marketing Company in Chennai Project Centers in Chennai