IXRControl (Windows Embedded CE 6.0)

1/6/2010

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

Syntax

class IXRControl : public IXRFrameworkElement

Methods

Method Description

IXRControl::AddIsEnabledChangedEventHandler

Attaches a delegate to the IsEnabledChanged event for this control. When the IsEnabledChanged event is raised by this control, this delegate will be invoked.

IXRControl::Focus

Attempts to transfer the UI focus to this control.

IXRControl::GetBackground

Retrieves a Brush that provides 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 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 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.

Remarks

The IXRControl class is the base class for many of the controls that you add to an application, such as an item's control and 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 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.

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 control's appearance.

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.

If you want to create a control with custom behavior and with the ability to enable other developers to customize its appearance, your control can inherit from IXRControl and define a control template.

If you want to extend the functionality of an existing control, you can inherit from a class that inherits from IXRControl.

Inheritance Hierarchy

IXRDependencyObject

    IXRUIElement

        IXRFrameworkElement

            IXRControl

                IXRContentControl

                IXRContentPresenter

                IXRItemsControl

                IXRPasswordBox

                IXRRangeBase

                IXRTextBox

                IXRThumb

                IXRUserControl

                IXRWin32Control

.NET Framework Equivalent

System.Windows.Controls.Control

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