-
Notifications
You must be signed in to change notification settings - Fork 500
/
Copy pathPage.xaml.cs
49 lines (45 loc) · 1.36 KB
/
Page.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using System;
using System.Collections.Generic;
using System.Linq;
using Windows.UI;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Documents;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Media.Animation;
using Windows.UI.Xaml.Shapes;
namespace ButtonEx
{
public partial class Page : UserControl
{
public Page()
{
InitializeComponent();
}
//<snippet11>
void OnClick1(object sender, RoutedEventArgs e)
{
btn1.Foreground = new SolidColorBrush(Windows.UI.Colors.Blue);
text1.Text = "Click event occurs on Hover.";
text2.Text = "";
text3.Text = "";
}
void OnClick2(object sender, RoutedEventArgs e)
{
btn2.Foreground = new SolidColorBrush(Windows.UI.Colors.Green);
text1.Text = "";
text2.Text = "Click event occurs on Press.";
text3.Text = "";
}
void OnClick3(object sender, RoutedEventArgs e)
{
btn1.Foreground = new SolidColorBrush(Windows.UI.Colors.Green);
btn2.Foreground = new SolidColorBrush(Windows.UI.Colors.Blue);
text1.Text = "";
text2.Text = "";
text3.Text = "Click event occurs on Release.";
}
//</snippet11>
}
}