WinFormContainer Class
- Last UpdatedAug 21, 2026
- 1 minute read
This class adds logic to ensure the embedded WinForms control is disposed properly when disposing the WPF wrapper control.
'Declaration
<DesignerCategoryAttribute("code")>
<ContentPropertyAttribute("Child")>
<DefaultEventAttribute("ChildChanged")>
<StyleTypedPropertyAttribute(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)>
<XmlLangPropertyAttribute("Language")>
<UsableDuringInitializationAttribute(True)>
<RuntimeNamePropertyAttribute("Name")>
<UidPropertyAttribute("Uid")>
<TypeDescriptionProviderAttribute(MS.Internal.ComponentModel.DependencyObjectProvider)>
<NameScopePropertyAttribute("NameScope", System.Windows.NameScope)>
Public Class WinFormContainer
Inherits System.Windows.Forms.Integration.WindowsFormsHost
Implements ArchestrA.Client.RuntimeData.ICustomWinformsHost, ArchestrA.Client.RuntimeData.IUserActivity
[DesignerCategory("code")]
[ContentProperty("Child")]
[DefaultEvent("ChildChanged")]
[StyleTypedProperty(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)]
[XmlLangProperty("Language")]
[UsableDuringInitialization(true)]
[RuntimeNameProperty("Name")]
[UidProperty("Uid")]
[TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)]
[NameScopeProperty("NameScope", System.Windows.NameScope)]
public class WinFormContainer : System.Windows.Forms.Integration.WindowsFormsHost, ArchestrA.Client.RuntimeData.ICustomWinformsHost, ArchestrA.Client.RuntimeData.IUserActivity
[DesignerCategory("code")]
[ContentProperty("Child")]
[DefaultEvent("ChildChanged")]
[StyleTypedProperty(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)]
[XmlLangProperty("Language")]
[UsableDuringInitialization(true)]
[RuntimeNameProperty("Name")]
[UidProperty("Uid")]
[TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)]
[NameScopeProperty("NameScope", System.Windows.NameScope)]
public ref class WinFormContainer : public System.Windows.Forms.Integration.WindowsFormsHost, ArchestrA.Client.RuntimeData.ICustomWinformsHost, ArchestrA.Client.RuntimeData.IUserActivity