次の方法で共有


IXRContentPresenter (Windows Embedded CE 6.0)

1/6/2010

This class represents how to display content inside a control.

Syntax

class IXRContentPresenter : public IXRControl

Methods

Method Description

IXRContentPresenter::GetContent

Retrieves the object that represents the content to display inside this content presenter.

IXRContentPresenter::SetContent

Sets the object that represents the content to display inside this content presenter.

Remarks

A content presenter can be used to specify positioning information, such as how the control's contents are aligned horizontally or vertically.

You can access an IXRContentPresenter object in the control template of a control.

This object is declared in the source Silverlight 2 XAML for your application. For information about the differences between XAML in Silverlight for Windows Embedded and Silverlight 2, see Differences Between Silverlight for the Web and Silverlight for Windows Embedded. For more information about how to define this element in the source XAML for your application, see this Microsoft Web site.

After you parse the source XAML into a visual tree, you can access this object in the visual tree by finding the object by name, obtaining an IXRControl pointer on a control, and calling the method IXRControl::GetTemplate to obtain an IXRControlTemplate pointer to its control template. This pointer provides access to the element sub-tree for that control template.

Inheritance Hierarchy

IXRDependencyObject

    IXRUIElement

        IXRFrameworkElement

            IXRControl

                IXRContentPresenter

.NET Framework Equivalent

System.Windows.Controls.ContentPresenter

Requirements

Header XamlRuntime.h
sysgen SYSGEN_XAML_RUNTIME
Windows Embedded CE Windows Embedded CE 6.0 R3

See Also

Reference

Classes for UI Element Management