// Running the WPF Application
#if INTERACTIVE
#r @"WindowsBase.dll"
#r @"PresentationCore.dll"
#r @"PresentationFramework.dll"
#endif
open System.Windows
open System.Windows.Controls
open System.Windows.Markup
let run app data = app |> parseApplication
|> XamlReader.Parse
|> fun x -> (x :?> System.Windows.Application)
|> fun x -> x.MainWindow.DataContext <- data
x.MainWindow.Show()
x.Run()
|> ignore
No comments:
Post a Comment