Luis
Luis

Reputation: 2715

Add a WPF UserControl to a TaskPane

I am developing an addin to Microsoft Outlook.

The following code works fine if I use an winforms UserControl:

private void ThisAddIn_Startup(object sender, System.EventArgs e)
{            
    var testControlView1 = new UserControl1();
    var MyCustomPane = this.CustomTaskPanes.Add(testControlView, "Hello");
}

How can I do it with a WPF UserControl, instead? Does anybody know how I would achieve similar functionality?

As far as I can tell the CustomTaskPanes only allow Winforms Controls to be added to it.

Upvotes: 3

Views: 3086

Answers (1)

Luis
Luis

Reputation: 2715

Just found a solution, https://stevepietrekweblog.wordpress.com/2009/03/24/vsto-display-wpf-user-control-in-custom-task-pane/

This update was just to update the link.

Upvotes: 3

Related Questions