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