WinFormContainer Class
- Last UpdatedSep 29, 2026
- 2 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
Target Platforms:
- Windows 10 Enterprise, IoT Enterprise 2019 LTSC (1809)
- Windows 10 Enterprise 2021 LTSC (21H2)
- Windows 10 IoT Enterprise (Only) 2021 LTSC (21H2)
- Windows 11 Enterprise, IoT Enterprise 2024 LTSC 24H2
- Windows Server 2019 LTSC (Datacenter, Essentials, Standard)
- Windows Server IoT 2019 LTSC
- Windows Server 2022 LTSC Standard and Datacenter
- Windows Server 2025 LTSC Standard and Datacenter