Is there some "new/better"
way to open a WPF window
and get some return object when it closes than using COM
?
Or is it still - in year 2014 - the way to go?
Something like this:
[Guid("14B55D90-E07B-4DC9-B2EE-25F15607518B")]
[ComVisible(true)]
public interface ComInterface
{
[DispId(0)]
void ShowWindow();
}
[Guid("CC01974D-82E2-4E9E-A48C-562D3ED83459")]
[ComVisible(true)]
[ClassInterface(ClassInterfaceType.None)]
[ComDefaultInterface(typeof(ComInterface))]
public class ComClass: ComInterface
{
public void ShowWindow()
{
MainWPFWindow window = new MainWPFWindow();
window.Show();
}
}