ButtonBase.Click Event
.NET Framework 3.0
Occurs when a Button is clicked.
Namespace: System.Windows.Controls.Primitives
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
A button's Click event handles MouseLeftButtonDown and MouseRightButtonDown events. If an application author tries to attach an event handler for these events, they are never raised. For information on how to use these events see MouseLeftButtonDown and PreviewMouseRightButtonDown.
The following example shows how the Click event is used to handle button clicks.
<Button Name="btn1" Background="Pink" BorderBrush="Black" BorderThickness="1" Click="OnClick1"> ClickMe1 </Button> <Button Name="btn2" Background="LightBlue" BorderBrush="Black" BorderThickness="1" Click="OnClick2"> ClickMe2 </Button> <Button Name="btn3" Click="OnClick3">Reset</Button>
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: