Introduction
This writing is a continuation of my previous article in which I was briefing you about button control and I was developing a button click based message box, using Visual Studio on Windows Presentation Foundation. Here, I will be writing about the characteristics of the button in detail.
Target Audience – Beginner
Tips: Go through my previous writings related to Windows Presentation Foundation to get more knowledge about it.
Now, let’s go through the columns given below to get an idea about Properties, Methods and Events in Button Class:
List of Properties in Button Class.
S.No. | Properties |
1 | Background |
2 | BorderBrush |
3 | BorderThickness |
4 | Content |
5 | ClickMode |
6 | ContentTemplate |
7 | FontFamily |
8 | FontSize |
9 | FontStyle |
10 | FontWeight |
11 | Foreground |
12 | Height |
13 | HorizontalAlignment |
14 | IsEnabled |
15 | IsPressed |
16 | Margin |
17 | Name |
18 | Opacity |
19 | Resources |
20 | Style |
21 | Template |
22 | VerticalAlignment |
23 | Visibility |
24 | Width |
List of Methods in Button class
S.No. | Methods |
1 | ClearValue |
2 | FindName |
3 | OnApplyTemplate |
4 | OnContentChanged |
5 | OnDragEnter |
6 | OnDragLeave |
7 | OnDragOver |
8 | OnDrop |
9 | OnGotFocus |
10 | OnKeyDown |
11 | OnKeyUp |
12 | OnLostFocus |
13 | SetBinding |
List of Events in Button class
S.No. | Events of Button Class |
1 | Click |
2 | DataContextChanged |
3 | DragEnter |
4 | DragLeave |
5 | DragOver |
6 | DragStarting |
7 | GotFocus |
8 | Holding |
9 | IsEnabledChanged |
10 | KeyDown |
11 | KeyUp |
12 | LostFocus |
13 | SizeChanged |