IXRControl (Compact 2013)
3/28/2014
This class represents the base class for UI elements that use a control template to define their appearance.
Syntax
class IXRControl : public IXRFrameworkElement
Inheritance Hierarchy
IXRControl
Methods
Method |
Description |
---|---|
Attaches a delegate to the IsEnabledChanged event for this control. |
|
Attempts to transfer the UI focus to this control. |
|
Retrieves a brush that paints the background of this control. |
|
Retrieves a brush that defines the border background of this control. |
|
Retrieves a value that describes the width of the frame surrounding this control. |
|
Retrieves the font that is used to display text in this control. |
|
Retrieves the size of the text in this control. |
|
Retrieves a value that indicates how much a font is condensed or expanded on-screen. |
|
Retrieves the style in which the text is rendered. |
|
Retrieves a value that indicates the density of a typeface, as measured by the lightness or heaviness of the strokes. |
|
Retrieves a brush that paints the foreground of this control. |
|
Retrieves the horizontal alignment of the content in this control. |
|
Retrieves a value that indicates whether this control is enabled in the UI. |
|
Retrieves a value that indicates whether this control is included in the tab order and is thus able to receive UI focus. |
|
Retrieves a value that measures the space between the content of this control and its margin. |
|
Retrieves a value that determines the order in which elements receive the UI focus when the user navigates through controls by using the TAB key. |
|
Retrieves a value that modifies how tabbing and tab indexes work for this control. |
|
Retrieves the control template that is used to define the appearance of this control. |
|
Retrieves the vertical alignment of the content in this control. |
|
Transitions the control between two states. |
|
Removes a delegate from the IsEnabledChanged event for this control. |
|
Sets the brush that provides the background of this control. |
|
Sets the brush that defines the border background of this control. |
|
Sets a value that describes the new width of the frame surrounding this control. |
|
Retrieves the font that is used to display text in this control. |
|
Sets the size of the text in this control. |
|
Sets a value that indicates how much a font is condensed or expanded on screen. |
|
Sets the style in which the text is rendered. |
|
Sets a value that indicates the density of a typeface, as measured by the lightness or heaviness of the strokes. |
|
Sets the brush that paints the foreground of this control. |
|
Sets the horizontal alignment of the content in this control. |
|
Sets a value that indicates whether this control is enabled in the UI. |
|
Sets a value that indicates whether this control is included in the tab order and is thus able to receive UI focus. |
|
Sets a new measurement for the space between the content of this control and its margin. |
|
Sets a value that determines the order in which elements receive the UI focus when the user navigates through controls by using the TAB key. |
|
Sets a value that modifies how tabbing and tab indexes work for this control. |
|
Sets the control template that is used to define the appearance of this control. |
|
Sets the vertical alignment of the content in 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
The IXRControl class is the base class for many of the controls that you add to an application, such as an item control or a text-box control. Each of these controls uses a control template to define their appearance.
You can define a control template in the source XAML for Windows Embedded XAML for your application. For information about the differences between XAML in XAML for Windows Embedded and Silverlight 3, see Differences Between Microsoft Silverlight 3 and XAML for Windows Embedded. For more information about how to define this element in the source XAML for your application, see the ControlTemplate Class on MSDN.
When the source XAML is parsed into a visual tree, this control template is represented by an IXRControlTemplate object.
The methods IXRControl::GetTemplate and IXRControl::SetTemplate are used to specify the appearance of an IXRControl object. These methods access an IXRControlTemplate object that defines the appearance of the control.
If you want to change the appearance of a control yet keep its functionality, you might consider creating a new control template for an IXRControl object, instead of creating a new control class.
IXRControl has a derived class, IXRUserControl, that is the intended intermediate base class for quickly creating custom controls. Although IXRUserControl inherits the template from the IXRControl class, you cannot apply an IXRControlTemplate to an IXRUserControl. You can include other UI elements in an IXRUserControl, even other controls such as IXRButton.
If you want to create a control with custom behavior, your control can inherit from IXRCustomUserControl; however, this control also cannot use an IXRControlTemplate.
To create a custom XAML tag, use the functionality provided by IXRApplication::RegisterXamlObject and PFN_CREATE_XAMLOBJECT.
If you create a class instance, use an IXRControlPtr smart pointer instead of a raw interface pointer. For more information, see XRPtr<Interface>.
.NET Framework Equivalent
System.Windows.Controls.Control
Requirements
Header |
XamlRuntime.h |
sysgen |
SYSGEN_XAML_RUNTIME |