To answer my own question...

I just came across this article:

[link:eprystupa.wordpress.com]

Lifting the code from there seems to work:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 

let display_plot (plot: Plot) = 
    let thread = new System.Threading.Thread (
                        new System.Threading.ThreadStart( fun () ->
                                                                let window = new System.Windows.Window()
                                                                window.Show() |> ignore  
                                                                window.Closed.Add(fun _  -> window.Dispatcher.InvokeShutdown())
                                                                System.Windows.Threading.Dispatcher.Run()
                        )
                    )
    thread.SetApartmentState(System.Threading.ApartmentState.STA)
    thread.IsBackground <- true
    thread.Start()
    "plot"

Regards,

Michael

By on 5/11/2009 1:55 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper