none
F Sharp Gui design RRS feed

  • Question

  • Hello! I'm at student at Milan University (Italy) and I'm following a course on F#. It is very specific about functional languages so we don't do anything with user interface. I've never used Visual Studio and .NET languages before so I'm trying to design some user interface with F #. On my book (Expert F#) there's only a few exemples of gui design so I'm searching for a step by step guide for gui design with visual studio with f sharp. I've searched on Internet and MSDN Library but I've not found anything complete.. Could anyone suggest me the right way for leaning that?
    Saturday, May 5, 2012 11:41 PM

All replies

  • Unfortunately there is almost no tooling support (like GUI designer or Expression) in Visual Studio to create UI in F#.

    But you can start with this link:

    Developing Client-Side Applications by Tomas Petricek http://msdn.microsoft.com/en-us/library/hh273071.aspx

    Also there are also good Visual Studio online templates of F# UI projects (Silverlight, WPF etc.)


    Petr

    • Proposed as answer by VallarasuS Saturday, May 12, 2012 12:00 PM
    Monday, May 7, 2012 1:09 PM
  • Thank you :)

    Saturday, May 26, 2012 12:41 PM
  • https://github.com/dmitry-a-morozov/fsharp-wpf-mvc-series

    I'm interested in your GUI work.

    How did it go?

    Thanks, Art Scott


    Peace Love Happiness PLH Only One Earth OOE

    Sunday, February 23, 2014 3:05 PM
  • Since this topic has been revived, here are a couple of pointers that may be of use to anyone else with the same requirements:

    Even back when the question was asked, you could do F# plus a designer-crafted GUI by using Glade as that designer, along with the .net support for GTK provided by Mono (the translation of the tutorial example from C# to F# is trivial).  The GTK# bundle offered with Mono 2.10 has everything you need (although with only 32-bit GTK+ native libraries), except for the Glade designer for GTK+2 (Glade 3.8.3 being the most recent current version with GTK+2 support), and up to now it's what I've been using for side-projects with GUI requirements; and there is some level of on-going development by Xamarin.

    Now in the last month, there's a new WPF/XAML type provider project on GitHub https://github.com/ReedCopsey/FsXaml which lets you design your WPF UI in Visual Studio and bind directly to it in your F# code, replacing all the hidden code generation in the C# build process with type provider goodness.

    For completeness' sake, I'll also mention WX.Net and its ability to load wx's XRC files (as designed by one of several designer tools), but I've not investigated how well that works.  The most recent updates to WX.Net are long enough ago that it looks like possible abandonware.

    Sunday, February 23, 2014 6:19 PM