次の方法で共有


IXRButtonBase (Compact 2013)

3/28/2014

This class represents the base class for all button controls, such as IXRButton, IXRRepeatButton, and IXRToggleButton.

Syntax

class IXRButtonBase : public IXRContentControl

Inheritance Hierarchy

IXRDependencyObject

    IXRUIElement

        IXRFrameworkElement

            IXRControl

                IXRContentControl

                    IXRButtonBase

                        IXRButton

                        IXRRepeatButton

                        IXRToggleButton

                            IXRCheckBox

                            IXRRadioButton

Methods

Method

Description

IXRButtonBase::AddClickEventHandler

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

IXRButtonBase::GetClickMode

Retrieves a value that specifies the action that raises the Click event for this button control.

IXRButtonBase::GetIsFocused

Retrieves a value that indicates whether the button control has the UI focus.

IXRButtonBase::GetIsMouseOver

Retrieves a value that indicates whether the mouse pointer is located over this button control.

IXRButtonBase::GetIsPressed

Retrieves a value that indicates whether this button control is currently in a pressed state.

IXRButtonBase::RemoveClickEventHandler

Removes a delegate from the Click event for this button control.

IXRButtonBase::SetClickMode

Sets a value that specifies the action that raises the Click event for this button control.

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

You can attach a delegate to the Click event in order to handle the event raised when the user clicks an object derived from IXRButtonBase. To do this, use the IXRButtonBase::AddClickEventHandler method.

Note

You should use the Click event to detect a button click instead of using MouseLeftButtonDown or MouseLeftButtonUp.

When you create a class instance, use an IXRButtonBasePtr smart pointer instead of a raw interface pointer. For more information, see XRPtr<Interface>.

.NET Framework Equivalent

System.Windows.Controls.Primitives.ButtonBase

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

Classes for UI Element Management