IXRRadioButton (Windows Embedded CE 6.0)

1/6/2010

This class represents a button that allows a user to select a single option from a group of options.

Syntax

class IXRRadioButton : public IXRToggleButton

Methods

Method Description

IXRRadioButton::GetGroupName

Retrieves the name that specifies which radio-button controls are mutually exclusive.

IXRRadioButton::SetGroupName

Sets the name that specifies which radio-button controls are mutually exclusive.

Remarks

IXRRadioButton is a control that is usually used as an item in a group of IXRRadioButton controls, with each control representing an alternative user setting. However, you can create a single IXRRadioButton control. You can group IXRRadioButton controls by putting them inside a parent element, or by using the IXRRadioButton::SetGroupName method. IXRRadioButton and IXRCheckBox controls have similar functionality; they offer choices that a user can select or clear. When IXRRadioButton controls are grouped, the buttons are mutually exclusive. A user can select only one item at a time in a group of IXRRadioButton controls.

An IXRRadioButton control has two states: selected (checked) or cleared (unchecked). Whether an IXRRadioButton control is selected is determined by the value accessed by inherited methods IXRToggleButton::GetIsChecked and IXRToggleButton::SetIsChecked.

When an IXRRadioButton control is cleared, the inherited method IXRToggleButton::GetIsChecked retrieves a value of XRThreeState.XRThreeState_Checked. When an IXRRadioButton control is cleared, the inherited method IXRToggleButton::GetIsChecked retrieves a value of XRThreeState.XRThreeState_Unchecked.

An IXRRadioButton control can be cleared by clicking another IXRRadioButton in the group. However, it cannot be cleared by clicking it again. An IXRRadioButton can be cleared programmatically by calling IXRToggleButton::SetIsChecked and passing in XRThreeState.XRThreeState_Unchecked.

IXRRadioButton is a content control and inherits from IXRContentControl. Its content property can be accessed by calling IXRContentControl::GetContent.

You can also define a radio button in Microsoft Silverlight 2. 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

                        IXRToggleButton

                            IXRRadioButton

.NET Framework Equivalent

System.Windows.Controls.RadioButton

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