Поделиться через


IXRContentControl (Compact 2013)

3/28/2014

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

Inheritance Hierarchy

IXRDependencyObject

    IXRUIElement

        IXRFrameworkElement

            IXRControl

                IXRContentControl

                    IXRButtonBase

                        IXRButton

                        IXRRepeatButton

                        IXRToggleButton

                    IXRListBoxItem

                        IXRComboBoxItem

                    IXRScrollViewer

                    IXRToolTip

Methods

Method

Description

IXRContentControl::GetContent

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

IXRContentControl::GetContentTemplate

Retrieves the object that represents the data template used to display the content inside this control.

IXRContentControl::SetContent

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

IXRContentControl::SetContentTemplate

Sets the object that represents the data template used to display the content inside this control.

Thread Safety

Members of this class are thread safe if you previously called IXRApplication::CreateHostFromXaml and supplied it with an XRWindowCreateParams structure that has AllowsMultipleThreadAccess set to true.

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 the screen, inside its bounding frame. When Content is an object derived from IXRUIElement, 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 for the content. You can access or modify the content data template by calling IXRContentControl::GetContentTemplate or IXRContentControl::SetContentTemplate.

When you create a class instance, use an IXRContentControlPtr smart pointer instead of a raw interface pointer. For more information, see XRPtr<Interface>.

.NET Framework Equivalent

System.Windows.Controls.ContentControl

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

Classes for UI Element Management