将 WPF 用户控件添加到任务窗格
我正在开发 Microsoft Outlook 的插件。
如果我使用 winforms UserControl,以下代码可以正常工作:
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
var testControlView1 = new UserControl1();
var MyCustomPane = this.CustomTaskPanes.Add(testControlView, "Hello");
}
我怎样才能使用 WPF UserControl 来做到这一点?有人知道我如何实现类似的功能吗?
据我所知,CustomTaskPanes 只允许添加 Winforms 控件。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
刚刚找到解决办法,
https:// /stevepietrekweblog.wordpress.com/2009/03/24/vsto-display-wpf-user-control-in-custom-task-pane/
此更新只是为了更新链接。
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.