LinqPad で WPF オブジェクトを正常にインスタンス化する方法はありますか? これが私の例です(正しいアセンブリがクエリに追加されるなど):
var w = new Window();
w.Loaded += (o,e) => {
w.Content = new TextBlock() { Text = "Foo" };
};
w.Show();
ただし、これは恐ろしい死に方をします。
System.Runtime.InteropServices.InvalidComObjectException: COM object that has been separated from its underlying RCW cannot be used.
at System.Windows.Input.TextServicesContext.StopTransitoryExtension()
at System.Windows.Input.TextServicesContext.Uninitialize(Boolean appDomainShutdown)
at System.Windows.Input.TextServicesContext.TextServicesContextShutDownListener.OnShutDown(Object target, Object sender, EventArgs e)
at MS.Internal.ShutDownListener.HandleShutDown(Object sender, EventArgs e)
これを機能させる方法についての手がかりはありますか?