Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

ButtonBase Class

Represents the base class for all Button controls.

Namespace:  System.Windows.Controls.Primitives
Assembly:  PresentationFramework (in PresentationFramework.dll)
[LocalizabilityAttribute(LocalizationCategory.Button)]
public abstract class ButtonBase : ContentControl, 
	ICommandSource
This class is abstract; see Inheritance Hierarchy for derived non-abstract classes usable in XAML.

Handle the Click event to respond when the user clicks a ButtonBase. The user can raise the Click event by using an AccessText or by pressing ENTER or the SPACEBAR when the control has focus. When the user presses the SPACEBAR, the control sets IsPressed to true and captures the mouse. As a result, the control will raise mouse events such as MouseEnter and IsMouseDirectlyOverChanged. Note that using the AccessText or ENTER does not change IsPressed or capture the mouse, but it does raise the Click event.

The ButtonBase sets the AcceptsReturn attached property to true.

The ButtonBase sets the IsInputMethodEnabled property to false.

Content Model:  ButtonBase is a ContentControl. Its content property is Content. For more information on the content model for ButtonBase, see Controls Content Model Overview.

System.Object
  System.Windows.Threading.DispatcherObject
    System.Windows.DependencyObject
      System.Windows.Media.Visual
        System.Windows.UIElement
          System.Windows.FrameworkElement
            System.Windows.Controls.Control
              System.Windows.Controls.ContentControl
                System.Windows.Controls.Primitives.ButtonBase
                  System.Windows.Controls.Button
                  System.Windows.Controls.GridViewColumnHeader
                  System.Windows.Controls.Primitives.RepeatButton
                  System.Windows.Controls.Primitives.ToggleButton
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.