Export (0) Print
Expand All

FrameworkContentElement.AddLogicalChild Method

Adds the provided element as a child of this element.

Namespace: System.Windows
Assembly: PresentationFramework (in presentationframework.dll)

protected internal void AddLogicalChild (
	Object child
)
protected void AddLogicalChild (
	Object child
)
protected internal function AddLogicalChild (
	child : Object
)
You cannot use methods in XAML.

Parameters

child

The child element to be added.

This method can raise an exception if called at a time when the logical tree is being iterated by another process.

Most FrameworkContentElement derived classes expose dedicated collections that are responsible for containment (for example, Inlines on the Span class; Blocks on the Section class). You can typically avoid any need to manipulate the logical tree directly if you derive from these classes instead. Working with the logical tree for content elements is an advanced scenario that may require a specialized parser or a specialized FrameworkElement that acts as the parent rendering element (content host).

For more information about how to use LogicalChildren and AddLogicalChild, see Element Tree.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft