IXRControl (Compact 2013)

3/28/2014

This class represents the base class for UI elements that use a control template to define their appearance.


class IXRControl : public IXRFrameworkElement

IXRDependencyObject

    IXRUIElement

        IXRFrameworkElement

            IXRControl

                IXRContentControl

                IXRContentPresenter

                IXRItemsControl

                IXRPasswordBox

                IXRRangeBase

                IXRTextBox

                IXRThumb

                IXRUserControl

                IXRWin32Control

Method

Description

IXRControl::AddIsEnabledChangedEventHandler

Attaches a delegate to the IsEnabledChanged event for this control.

IXRControl::Focus

Attempts to transfer the UI focus to this control.

IXRControl::GetBackground

Retrieves a brush that paints the background of this control.

IXRControl::GetBorderBrush

Retrieves a brush that defines the border background of this control.

IXRControl::GetBorderThickness

Retrieves a value that describes the width of the frame surrounding this control.

IXRControl::GetFontFamily

Retrieves the font that is used to display text in this control.

IXRControl::GetFontSize

Retrieves the size of the text in this control.

IXRControl::GetFontStretch

Retrieves a value that indicates how much a font is condensed or expanded on-screen.

IXRControl::GetFontStyle

Retrieves the style in which the text is rendered.

IXRControl::GetFontWeight

Retrieves a value that indicates the density of a typeface, as measured by the lightness or heaviness of the strokes.

IXRControl::GetForeground

Retrieves a brush that paints the foreground of this control.

IXRControl::GetHorizontalContentAlignment

Retrieves the horizontal alignment of the content in this control.

IXRControl::GetIsEnabled

Retrieves a value that indicates whether this control is enabled in the UI.

IXRControl::GetIsTabStop

Retrieves a value that indicates whether this control is included in the tab order and is thus able to receive UI focus.

IXRControl::GetPadding

Retrieves a value that measures the space between the content of this control and its margin.

IXRControl::GetTabIndex

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.

IXRControl::GetTabNavigation

Retrieves a value that modifies how tabbing and tab indexes work for this control.

IXRControl::GetTemplate

Retrieves the control template that is used to define the appearance of this control.

IXRControl::GetVerticalContentAlignment

Retrieves the vertical alignment of the content in this control.

IXRControl::GoToVisualState

Transitions the control between two states.

IXRControl::RemoveIsEnabledChangedEventHandler

Removes a delegate from the IsEnabledChanged event for this control.

IXRControl::SetBackground

Sets the brush that provides the background of this control.

IXRControl::SetBorderBrush

Sets the brush that defines the border background of this control.

IXRControl::SetBorderThickness

Sets a value that describes the new width of the frame surrounding this control.

IXRControl::SetFontFamily

Retrieves the font that is used to display text in this control.

IXRControl::SetFontSize

Sets the size of the text in this control.

IXRControl::SetFontStretch

Sets a value that indicates how much a font is condensed or expanded on screen.

IXRControl::SetFontStyle

Sets the style in which the text is rendered.

IXRControl::SetFontWeight

Sets a value that indicates the density of a typeface, as measured by the lightness or heaviness of the strokes.

IXRControl::SetForeground

Sets the brush that paints the foreground of this control.

IXRControl::SetHorizontalContentAlignment

Sets the horizontal alignment of the content in this control.

IXRControl::SetIsEnabled

Sets a value that indicates whether this control is enabled in the UI.

IXRControl::SetIsTabStop

Sets a value that indicates whether this control is included in the tab order and is thus able to receive UI focus.

IXRControl::SetPadding

Sets a new measurement for the space between the content of this control and its margin.

IXRControl::SetTabIndex

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.

IXRControl::SetTabNavigation

Sets a value that modifies how tabbing and tab indexes work for this control.

IXRControl::SetTemplate

Sets the control template that is used to define the appearance of this control.

IXRControl::SetVerticalContentAlignment

Sets the vertical alignment of the content in this control.

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.

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>.

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

Show: