¿Hay alguna manera de crear instancias sensatas de objetos WPF en LinqPad? Aquí está mi ejemplo (los conjuntos correctos se agregan en la consulta, etc.):Creando ejemplos de WPF en LinqPad
var w = new Window();
w.Loaded += (o,e) => {
w.Content = new TextBlock() { Text = "Foo" };
};
w.Show();
Sin embargo, este muere una muerte horrible:
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)
Alguna pista sobre cómo puedo conseguir que esto funcione?
Actualización: este se fija en los últimos betas LINQPad - se puede mostrar ventanas de WPF cualquier forma que desee y no hay muertes horribles :) También puede hacer lo siguiente, que muestra un elemento WPF en el panel de salida: PanelManager.DisplayWpfElement (new TextBlock() {Text = "Foo"}); –