-
Notifications
You must be signed in to change notification settings - Fork 500
/
Copy pathPage.xaml.cs
43 lines (39 loc) · 1.22 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
using System;
using System.Collections.Generic;
using System.Linq;
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 CheckboxEx
{
public partial class Page : UserControl
{
public Page()
{
InitializeComponent();
}
//<snippet11>
private void HandleCheck(object sender, RoutedEventArgs e)
{
CheckBox cb = sender as CheckBox;
if (cb.Name == "cb1") text1.Text = "Two-state CheckBox checked.";
else text2.Text = "Three-state CheckBox checked.";
}
private void HandleUnchecked(object sender, RoutedEventArgs e)
{
CheckBox cb = sender as CheckBox;
if (cb.Name == "cb1") text1.Text = "Two-state CheckBox unchecked.";
else text2.Text = "Three-state CheckBox unchecked.";
}
private void HandleThirdState(object sender, RoutedEventArgs e)
{
CheckBox cb = sender as CheckBox;
text2.Text = "Three-state CheckBox indeterminate.";
}
//</snippet11>
}
}