Open WPF form from a VSTO outlook addin

后端 未结 3 1070
栀梦
栀梦 2020-12-17 21:17

I have this code in Thisaddin.cs

public void Search(string input)
{           
    ServerList listofservers = new ServerList();            
    listofservers         


        
3条回答
  •  天涯浪人
    2020-12-17 21:39

    Change UserControl with Window as already answered in XAML and c# class.

    Keep in mind that in VSTO applications, which are normally based on Windows Forms, it is important to remember to add System.XAML to references, otherwise you will probably get errors composing your forms layouts.

    This could happen in VS2015 as I recently experienced, where the wizard procedure did not work as expected, missing to update class references.

    Here some references: The type 'Window' does not support direct content

提交回复
热议问题