本文整理汇总了VB.NET中System.Windows.Forms.Integration.ElementHost类的典型用法代码示例。如果您正苦于以下问题:VB.NET ElementHost类的具体用法?VB.NET ElementHost怎么用?VB.NET ElementHost使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ElementHost类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: ElementHost
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Create the ElementHost control for hosting the
' WPF UserControl.
Dim host As New ElementHost()
host.Dock = DockStyle.Fill
' Create the WPF UserControl.
Dim uc As New HostingWpfUserControlInWf.UserControl1()
' Assign the WPF UserControl to the ElementHost control's
' Child property.
host.Child = uc
' Add the ElementHost control to the form's
' collection of child controls.
Me.Controls.Add(host)
End Sub