IXRToggleButton (Windows Embedded CE 6.0)

1/6/2010

This class represents the base class for button controls that can switch states.

Syntax

class IXRToggleButton : public IXRButtonBase

Methods

Method Description

IXRToggleButton::AddCheckedEventHandler

Attaches a delegate to the Checked event for this toggle button. When the Checked event is raised by this toggle button, this delegate will be invoked.

IXRToggleButton::AddIndeterminateEventHandler

Attaches a delegate to the Indeterminate event for this toggle button. When the Indeterminate event is raised by this toggle button, this delegate will be invoked.

IXRToggleButton::AddUncheckedEventHandler

Attaches a delegate to the Unchecked event for this toggle button. When the Unchecked event is raised by this toggle button, this delegate will be invoked.

IXRToggleButton::GetIsChecked

Retrieves a value that indicates whether this toggle button is in a checked state.

IXRToggleButton::GetIsThreeState

Retrieves a value that indicates whether this toggle button supports two or three states.

IXRToggleButton::RemovenCheckedEventHandler

Removes a delegate from the Checked event for this toggle button.

IXRToggleButton::RemoveIndeterminateEventHandler

Removes a delegate from the Indeterminate event for this toggle button.

IXRToggleButton::RemoveUncheckedEventHandler

Removes a delegate from the Unchecked event for this toggle button.

IXRToggleButton::SetIsChecked

Sets a value that indicates whether this toggle button is in a checked state.

IXRToggleButton::SetIsThreeState

Sets a value that indicates whether this toggle button supports two or three states.

Remarks

The IXRToggleButton class represents a toggle button that can switch to multiple states. The toggle button switches to another state when a user clicks on it. IXRToggleButton is the base class for IXRCheckBox and IXRRadioButton.

A toggle button can change its state to a maximum of three different states. For example, you could use a three-state toggle button to support "Yes", "No", and "Not Applicable" options for the user to choose from. When the toggle button raises a Checked event, you can query the state of the sending object to determine how to handle the event.

To access or modify the current state of this toggle button, use the methods IXRToggleButton::GetIsChecked and IXRToggleButton::SetIsChecked.

A toggle button can be configured to have three states, which enables the user to select a third, indeterminate state for the button by clicking it. To determine whether this toggle button has two or three states, call IXRToggleButton::GetIsThreeState. To enable the indeterminate state, call IXRToggleButton::SetIsThreeState.

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

                            IXRCheckBox

.NET Framework Equivalent

System.Windows.Controls.Primitives.ToggleButton

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