次の方法で共有


IXRContentControl (Windows Embedded CE 6.0)

1/6/2010

This class represents a control with a single piece of content, such as a UI object or a text string.

Syntax

class IXRContentControl : public IXRControl

Methods

Method Description

IXRContentControl::GetContent

Retrieves the object that represents the content that is displayed inside this control.

IXRContentControl::SetContent

Sets the object that represents the content that is displayed inside this control.

Remarks

IXRContentControl is the base class that other content controls inherit from. Content controls such as IXRCheckBox and IXRRadioButton inherit from this intermediate base class.

The Content property of an IXRContentControl object can be any kind of object, such as a text string, or an IXRUIElement derived object. The IXRContentControl object displays its content on-screen, inside its bounding frame. When Content is an IXRUIElement derived object, the IXRUIElement object is displayed inside the content control. When Content is set to another kind of object, a string representation of the object is displayed inside the content control.

You can access or modify this property by calling IXRContentControl::GetContent or IXRContentControl::SetContent.

An IXRContentControl object has a limited default style. If you want to augment the appearance of the control, you can create a new IXRContentControl::SetContent.

You can also define a content control in Microsoft Silverlight 2 XAML. 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.

Inheritance Hierarchy

IXRDependencyObject

    IXRUIElement

        IXRFrameworkElement

            IXRControl

                IXRContentControl

                    IXRButtonBase

                        IXRButton

                        IXRRepeatButton

                        IXRToggleButton

                    IXRListBoxItem

                        IXRComboBoxItem

                    IXRScrollViewer

                    IXRToolTip

.NET Framework Equivalent

System.Windows.Controls.ContentControl

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

Other Resources