Export (0) Print
Expand All

IAddChild Interface

Provides a means to parse elements that permit mixtures of child elements or text.

Namespace:  System.Windows.Markup
Assembly:  PresentationCore (in PresentationCore.dll)

'Declaration
Public Interface IAddChild

The IAddChild type exposes the following members.

  NameDescription
Public methodAddChildAdds a child object.
Public methodAddTextAdds the text content of a node to the object.
Top

For purposes of establishing or defining a content property or content model in WPF, IAddChild is obsolete. Apply the ContentPropertyAttribute to a custom class instead.

For purposes of XAML parser/processor behavior, IAddChild is obsolete. Collection behavior is now integrally part of the XAML type system and XAML processor implementations should use the dedicated APIs in the System.Xaml assembly. General user code should use the Add methods on the collection type used for the relevant type's child collection property.

The main remaining scenario for IAddChild is to support a FrameworkElementFactory that can handle child object creation, which is an advanced scenario. See FrameworkElementFactory.

Callers in .NET Framework 4.5 Beta targeted applications that attempt to use the IAddChild API for one of its original .NET Framework 3.0 era purposes (WPF content model, XAML processing) should expect that many current IAddChild-implementing classes will return NotImplementedException or similar results for the IAddChild API.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft