Click event

ButtonBase.Click event

Occurs when a button control is clicked.

Syntax


public:
event RoutedEventHandler^ Click {
   Windows::Foundation::EventRegistrationToken add(RoutedEventHandler^ value);
   void remove(Windows::Foundation::EventRegistrationToken token);
}


<button Click="eventhandler"/>

Event information

Delegate RoutedEventHandler

Examples

The following example demonstrates handling the Click event and setting the IsEnabled property of a Button, which inherits from ButtonBase.


<StackPanel>   
    <Button Content="Submit" 
            Click="submitButtonClick"/>
    <TextBlock x:Name="textBlock1"/>
</StackPanel>


No code example is currently available or this language may not be supported.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.UI.Xaml.Controls.Primitives
Windows::UI::Xaml::Controls::Primitives [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls.Primitives
Windows::UI::Xaml::Controls::Primitives [C++]

Metadata

Windows.winmd

See also

ButtonBase
Button

 

 

Show:
© 2017 Microsoft