-
Notifications
You must be signed in to change notification settings - Fork 500
/
Copy pathPage.xaml.vb
44 lines (39 loc) · 1.29 KB
/
Page.xaml.vb
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
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Documents
Imports System.Windows.Input
Imports System.Windows.Media
Imports System.Windows.Media.Animation
Imports System.Windows.Shapes
Partial Public Class Page
Inherits UserControl
Public Sub New()
MyBase.New()
InitializeComponent()
End Sub
' <snippet11>
Private Sub HandleCheck(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim cb As CheckBox = CType(sender, CheckBox)
If (cb.Name = "cb1") Then
text1.Text = "Two state CheckBox checked."
Else
text2.Text = "Three state CheckBox checked."
End If
End Sub
Private Sub HandleUnchecked(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim cb As CheckBox = CType(sender, CheckBox)
If (cb.Name = "cb1") Then
text1.Text = "Two state CheckBox unchecked."
Else
text2.Text = "Three state CheckBox unchecked."
End If
End Sub
Private Sub HandleThirdState(ByVal sender As Object, ByVal e As RoutedEventArgs)
Dim cb As CheckBox = CType(sender, CheckBox)
text2.Text = "Three state CheckBox indeterminate."
End Sub
' </snippet11>
End Class