ButtonBase Class
Represents the base class for all Button controls.
Assembly: PresentationFramework (in PresentationFramework.dll)
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.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
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.