I've started to play with c# interactive. In Visual Studio I was able to create some window with following code:
#r "PresentationFramework"
using System.Windows;
var w = new Window();
w.Show();
However due to this error using csi.exe I had to do something like this to see a window (I've run executable from net.compiler nuget package, tools directory):
#r "PresentationFramework"
using System.Windows;
using System.Threading;
var t = new Thread(()=>{var w = new Window(); w.Show(); Thread.Sleep(2000);});
t.SetApartmentState(ApartmentState.STA);
t.Start();
The window is displayed while the thread is running but I'm not sure how I could achieve behavior similar to this inside VS C# interactive view.
[Edited]
Hi Paweł,
Here is an answer (tested in csi this time), based on: Launching a WPF Window in a Separate Thread