F# 3.0 brings the new type providers feature which enables a lot of different applications. Today I’m happy to announce that the FSharpx project brings you a WPF designer for F# in the Visual Studio 11 beta.
A big kudos to Johann Deneux for writing the underlying XAML type provider.
- Create a new F# 3.0 Console application project
- Set the output type to “Windows Application” in the project settings
- Use nuget and install-package FSharpx.TypeProviders.Xaml
- Add references to WindowsBase.dll, PresentationFramework.dll, System.Xaml.dll and PresentationCore.dll
- Add a Xaml file to your project. Something like this:
- Now you can access the Xaml in a typed way:
- Start the project
Enjoy!
BTW: No code generation needed is for this. No more nasty *.xaml.cs files.
BTW2: Try to change the name of Button1 in the Xaml and press save.