open System.Windows.Forms
[<EntryPoint>]
let main argv =
let form = new Form()
let button = new Button()
button.Text <- "Click me"
button.Click.Add (fun _ -> MessageBox.Show "Hello" |> ignore)
form.Controls.Add button
Application.Run form
0jarcane didn't say you can't he said the documentation is all but non-existant
I have written thousands of pages of example applications in articles for the F# Journal.
There are some decent samples on MSDN, 56 in F# at the time of writing. Most aren't GUI apps, but some are.
https://code.msdn.microsoft.com/site/search?f%5B0%5D.Type=Pr...
My "WPF Image Cropper" sample might be interesting to you - pure F# WPF via XAML type provider. I am not a GUI dev, though, so it's probably crap design :)
Microsoft doesn't believe anyone wants to make apps in F#; Visual Studio doesn't even come with templates for it. You're expected to use F# to write libraries like Fsharp.Data, and write your app code in C#.
If I wanted to code in C#, I'd code in C#, but I don't.