IXRRadioButton (Compact 2013)
3/28/2014
This class represents a button that a user clicks to select a single option from a group of options.
Syntax
class IXRRadioButton : public IXRToggleButton
Inheritance Hierarchy
IXRRadioButton
Methods
Method |
Description |
---|---|
Retrieves the name that specifies which radio-button controls are mutually exclusive. |
|
Sets the name that specifies which radio-button controls are mutually exclusive. |
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
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.
When you create a class instance, use an IXRRadioButtonPtr smart pointer instead of a raw interface pointer. For more information, see XRPtr<Interface>.
You can also define a radio button in Microsoft Silverlight 3. 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 this RadioButton Class.
.NET Framework Equivalent
System.Windows.Controls.RadioButton
Requirements
Header |
XamlRuntime.h |
sysgen |
SYSGEN_XAML_RUNTIME |