Mercurial > silverbladetech
comparison SilverlightGlimpse/Controls/ExceptionsViewer.xaml @ 59:3591c26bd63e
MVVMLight added
author | Steven Hollidge <stevenhollidge@hotmail.com> |
---|---|
date | Sat, 21 Apr 2012 19:20:28 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
58:241e2f22ed3c | 59:3591c26bd63e |
---|---|
1 <UserControl x:Class="SilverlightGlimpse.Controls.ExceptionsViewer" | |
2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | |
4 <Grid x:Name="LayoutRoot" Background="White"> | |
5 <Grid.ColumnDefinitions> | |
6 <ColumnDefinition Width="250" /> | |
7 <ColumnDefinition Width="*" /> | |
8 </Grid.ColumnDefinitions> | |
9 <Grid.RowDefinitions> | |
10 <RowDefinition Height="Auto" /> | |
11 <RowDefinition Height="*" /> | |
12 <RowDefinition Height="Auto" /> | |
13 </Grid.RowDefinitions> | |
14 | |
15 <TextBlock Grid.ColumnSpan="2" | |
16 Margin="3.5" | |
17 VerticalAlignment="Center" | |
18 FontSize="18" | |
19 Foreground="Red" | |
20 Text="Exceptions Viewer" /> | |
21 | |
22 <ListBox x:Name="lbExceptions" | |
23 Grid.Row="1" | |
24 Margin="3.5" | |
25 ItemsSource="{Binding}" | |
26 SelectionChanged="lbExceptions_SelectionChanged" /> | |
27 | |
28 <ScrollViewer Grid.Row="1" | |
29 Grid.Column="1" | |
30 Margin="3.5" | |
31 DataContext="{Binding ElementName=lbExceptions, | |
32 Path=SelectedItem}"> | |
33 <Grid> | |
34 <Grid.RowDefinitions> | |
35 <RowDefinition Height="Auto" /> | |
36 <RowDefinition Height="Auto" /> | |
37 <RowDefinition Height="Auto" /> | |
38 <RowDefinition Height="Auto" /> | |
39 <RowDefinition Height="Auto" /> | |
40 <RowDefinition Height="Auto" /> | |
41 <RowDefinition Height="Auto" /> | |
42 <RowDefinition Height="Auto" /> | |
43 </Grid.RowDefinitions> | |
44 | |
45 <Rectangle Fill="BlanchedAlmond" /> | |
46 <TextBlock x:Name="tbAction" | |
47 FontSize="14" | |
48 Text="Action" | |
49 TextDecorations="Underline" /> | |
50 <TextBlock Grid.Row="1" | |
51 FontSize="11" | |
52 Text="{Binding Path=Action}" | |
53 TextWrapping="Wrap" | |
54 Visibility="{Binding ElementName=tbAction, | |
55 Path=Visibility}" /> | |
56 | |
57 <Rectangle Grid.Row="2" Fill="BlanchedAlmond" /> | |
58 <TextBlock Grid.Row="2" | |
59 Margin="0,7,0,0" | |
60 FontSize="14" | |
61 Text="Control Name" | |
62 TextDecorations="Underline" | |
63 Visibility="{Binding ElementName=tbAction, | |
64 Path=Visibility}" /> | |
65 <TextBlock Grid.Row="3" | |
66 FontSize="11" | |
67 Text="{Binding Path=ControlName}" | |
68 TextWrapping="Wrap" | |
69 Visibility="{Binding ElementName=tbAction, | |
70 Path=Visibility}" /> | |
71 | |
72 <Rectangle Grid.Row="4" Fill="BlanchedAlmond" /> | |
73 <TextBlock Grid.Row="4" | |
74 Margin="0,7,0,0" | |
75 FontSize="14" | |
76 Text="Message" | |
77 TextDecorations="Underline" /> | |
78 <TextBlock Grid.Row="5" | |
79 FontSize="11" | |
80 Text="{Binding Path=Exception.Message}" | |
81 TextWrapping="Wrap" /> | |
82 | |
83 <Rectangle Grid.Row="6" Fill="BlanchedAlmond" /> | |
84 <TextBlock Grid.Row="6" | |
85 Margin="0,7,0,0" | |
86 FontSize="14" | |
87 Text="Stack Trace" | |
88 TextDecorations="Underline" /> | |
89 <TextBlock Grid.Row="7" | |
90 FontSize="11" | |
91 Text="{Binding Path=Exception.StackTrace}" | |
92 TextWrapping="Wrap" /> | |
93 | |
94 </Grid> | |
95 </ScrollViewer> | |
96 <Button Grid.Row="2" | |
97 Grid.Column="1" | |
98 Margin="11" | |
99 HorizontalAlignment="Right" | |
100 VerticalAlignment="Center" | |
101 Click="ClearExceptions_Click" | |
102 Content="Clear Exceptions" | |
103 Padding="7" /> | |
104 </Grid> | |
105 </UserControl> |