IAddChild IAddChild IAddChild IAddChild Interface

定义

提供分析允许混合子元素或文本的元素所需的方法。Provides a means to parse elements that permit mixtures of child elements or text.

public interface class IAddChild
public interface IAddChild
type IAddChild = interface
Public Interface IAddChild
派生

注解

在 WPF IAddChild中建立或定义内容属性或内容模型的目的已过时。For purposes of establishing or defining a content property or content model in WPF, IAddChild is obsolete. ContentPropertyAttribute改为将应用到自定义类。Apply the ContentPropertyAttribute to a custom class instead.

出于 XAML 分析器/处理器行为的目的, IAddChild已过时。For purposes of XAML parser/processor behavior, IAddChild is obsolete. 集合行为现在 integrally XAML 类型系统的一部分, XAML 处理器实现应使用 system.exception 程序集中的专用 Api。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. 一般用户代码应对用于Add相关类型的子集合属性的集合类型使用方法。General user code should use the Add methods on the collection type used for the relevant type's child collection property.

的主要剩余方案IAddChildFrameworkElementFactory支持可以处理子对象创建的, 这是一个高级方案。The main remaining scenario for IAddChild is to support a FrameworkElementFactory that can handle child object creation, which is an advanced scenario. 请参阅 FrameworkElementFactorySee FrameworkElementFactory.

.NET Framework 4.5 Beta 目标应用程序中的调用方尝试将IAddChild API 用于其原始.NET Framework 3.0.NET Framework 3.0纪元之一 (WPF 内容模型、XAML 处理), 则应预计有许多当前IAddChild实现的类将返回NotImplementedException或类似于IAddChild API 的结果。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.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.

方法

AddChild(Object) AddChild(Object) AddChild(Object) AddChild(Object)

添加子对象。Adds a child object.

AddText(String) AddText(String) AddText(String) AddText(String)

将节点的文本内容添加到对象。Adds the text content of a node to the object.

适用于

另请参阅