如何在Visual Basic以及.Net 4.0和VS 2010中使用ElementHost [英] How to use ElementHost with visual basic and .Net 4.0 and VS 2010

查看:77
本文介绍了如何在Visual Basic以及.Net 4.0和VS 2010中使用ElementHost的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在创建一个显示自定义任务窗格的加载项.所有的示例代码都在C#和.NET 3.5中.我的元素主机代码有问题.

I'm creating an add-In that displays a customtaskpane.  All the sample code is in C# and for .Net 3.5; I'm having issues with the Element Host code.

 

导入 System.Windows.Forms.Integration    我收到的错误消息是,该命名空间不包含公共成员或可以找不到.

Imports System.Windows.Forms.Integration    The error I get complains that the namespace doesn't contain a public member or can't be found.  

 

我认为我发现了"Element Host" .Net 40的相关示例代码,但适用于C#(下面的链接)....有人知道如何在Visual Basic中做到这一点吗?

I think I found "Element Host" related sample code for .Net 40 however, it's for C# (link below)  ... does anyone know how to do this is Visual Basic?

 

  (如何:使用ElementHost在Windows窗体中托管WPF控件)

http://msdn.microsoft.com/en-us/library/ms754008.aspx  (How to: Host a WPF Control in Windows Forms by Using ElementHost)

 

谢谢

 

   

推荐答案

你好约翰,

您添加了对windowsformsintegration的引用吗?

you have added reference to windowsformsintegration?


这篇关于如何在Visual Basic以及.Net 4.0和VS 2010中使用ElementHost的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆