Mercurial > silverbladetech
comparison SilverlightGlimpse/SilverlightGlimpse.Test/MainPage.xaml.cs @ 63:536498832a79
Latest version before changing bindings to Listbox
author | Steven Hollidge <stevenhollidge@hotmail.com> |
---|---|
date | Sun, 22 Apr 2012 13:33:42 +0100 |
parents | 810116cd6b8e |
children | ba89e36631bc |
comparison
equal
deleted
inserted
replaced
62:810116cd6b8e | 63:536498832a79 |
---|---|
1 using System; | 1 namespace SilverlightGlimpse.Test |
2 using System.Collections.Generic; | |
3 using System.Linq; | |
4 using System.Net; | |
5 using System.Windows; | |
6 using System.Windows.Controls; | |
7 using System.Windows.Documents; | |
8 using System.Windows.Input; | |
9 using System.Windows.Media; | |
10 using System.Windows.Media.Animation; | |
11 using System.Windows.Shapes; | |
12 using System.Dynamic; | |
13 | |
14 namespace SilverlightGlimpse.Test | |
15 { | 2 { |
16 public partial class MainPage : UserControl | 3 public partial class MainPage |
17 { | 4 { |
18 public MainPage() | 5 public MainPage() |
19 { | 6 { |
20 InitializeComponent(); | 7 InitializeComponent(); |
21 throw new Exception("Test"); | |
22 } | |
23 | 8 |
24 private void Button_Click(object sender, RoutedEventArgs e) | 9 // uncomment this exception to view exception on startup |
25 { | 10 //throw new Exception("This exception has been thrown to demonstrate an exception during startup", new Exception("This is an inner exception")); |
26 var list = new List<object>(5) | |
27 { | |
28 new { Id = 1 , Name = "Steve"}, | |
29 new { Id = 2 , Name = "Dave"}, | |
30 new { Id = 3 , Name = "Bob"}, | |
31 new { Id = 4 , Name = "Rich"}, | |
32 new { Id = 5 , Name = "Clare"} | |
33 }; | |
34 this.DataContext = list; | |
35 } | 11 } |
36 } | 12 } |
37 } | 13 } |