#light open System open System.Windows open System.Windows.Controls type MainWindow(app: Application) as self = inherit Window() do let button = Button(Content = "Bye") button.Click.Add(fun f -> app.Shutdown(0)) self.Content <- button type App() = inherit Application() static member Go() = let app = new App() app.Run(new MainWindow(app, Title = "Hello world")) |> ignore [<STAThread>] App.Go()
The references are very similar to the C# code:
No comments:
Post a Comment