comparison SilverlightGlimpse/SilverlightValidation/Views/UserView.xaml.cs @ 79:5172a9b9800c

Ready to upload to codeplex
author Steven Hollidge <stevenhollidge@hotmail.com>
date Mon, 23 Apr 2012 23:07:23 +0100
parents dd6bcd2535b6
children
comparison
equal deleted inserted replaced
78:dd6bcd2535b6 79:5172a9b9800c
19 19
20 vm = new UserViewModel(UserModel.Create(), new UserModelValidator()); 20 vm = new UserViewModel(UserModel.Create(), new UserModelValidator());
21 this.DataContext = vm; 21 this.DataContext = vm;
22 22
23 // uncomment this exception to view exception on startup 23 // uncomment this exception to view exception on startup
24 //ThrowNestedException(); 24 //ThrowException();
25 } 25 }
26 26
27 private void DatePicker_KeyDown(object sender, KeyEventArgs e) 27 private void DatePicker_KeyDown(object sender, KeyEventArgs e)
28 { 28 {
29 if (e.Key != Key.Tab) 29 if (e.Key != Key.Tab)
30 e.Handled = true; 30 e.Handled = true;
31 } 31 }
32 32
33 private void btnThrowException_OnClick(object sender, RoutedEventArgs e) 33 private void btnThrowException_OnClick(object sender, RoutedEventArgs e)
34 { 34 {
35 ThrowNestedException(); 35 ThrowException();
36 } 36 }
37 37
38 private void ThrowNestedException() 38 private void ThrowException()
39 { 39 {
40 throw new Exception("Oh dear we've hit an exception!", 40 throw new Exception("Oh dear we've hit an exception!");
41 new Exception("This is an inner exception"));
42 } 41 }
43 } 42 }
44 } 43 }