Mercurial > silverbladetech
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SilverlightGlimpse/Controls/ExceptionsViewer.xaml Sat Apr 21 19:20:28 2012 +0100 @@ -0,0 +1,105 @@ +<UserControl x:Class="SilverlightGlimpse.Controls.ExceptionsViewer" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> + <Grid x:Name="LayoutRoot" Background="White"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="250" /> + <ColumnDefinition Width="*" /> + </Grid.ColumnDefinitions> + <Grid.RowDefinitions> + <RowDefinition Height="Auto" /> + <RowDefinition Height="*" /> + <RowDefinition Height="Auto" /> + </Grid.RowDefinitions> + + <TextBlock Grid.ColumnSpan="2" + Margin="3.5" + VerticalAlignment="Center" + FontSize="18" + Foreground="Red" + Text="Exceptions Viewer" /> + + <ListBox x:Name="lbExceptions" + Grid.Row="1" + Margin="3.5" + ItemsSource="{Binding}" + SelectionChanged="lbExceptions_SelectionChanged" /> + + <ScrollViewer Grid.Row="1" + Grid.Column="1" + Margin="3.5" + DataContext="{Binding ElementName=lbExceptions, + Path=SelectedItem}"> + <Grid> + <Grid.RowDefinitions> + <RowDefinition Height="Auto" /> + <RowDefinition Height="Auto" /> + <RowDefinition Height="Auto" /> + <RowDefinition Height="Auto" /> + <RowDefinition Height="Auto" /> + <RowDefinition Height="Auto" /> + <RowDefinition Height="Auto" /> + <RowDefinition Height="Auto" /> + </Grid.RowDefinitions> + + <Rectangle Fill="BlanchedAlmond" /> + <TextBlock x:Name="tbAction" + FontSize="14" + Text="Action" + TextDecorations="Underline" /> + <TextBlock Grid.Row="1" + FontSize="11" + Text="{Binding Path=Action}" + TextWrapping="Wrap" + Visibility="{Binding ElementName=tbAction, + Path=Visibility}" /> + + <Rectangle Grid.Row="2" Fill="BlanchedAlmond" /> + <TextBlock Grid.Row="2" + Margin="0,7,0,0" + FontSize="14" + Text="Control Name" + TextDecorations="Underline" + Visibility="{Binding ElementName=tbAction, + Path=Visibility}" /> + <TextBlock Grid.Row="3" + FontSize="11" + Text="{Binding Path=ControlName}" + TextWrapping="Wrap" + Visibility="{Binding ElementName=tbAction, + Path=Visibility}" /> + + <Rectangle Grid.Row="4" Fill="BlanchedAlmond" /> + <TextBlock Grid.Row="4" + Margin="0,7,0,0" + FontSize="14" + Text="Message" + TextDecorations="Underline" /> + <TextBlock Grid.Row="5" + FontSize="11" + Text="{Binding Path=Exception.Message}" + TextWrapping="Wrap" /> + + <Rectangle Grid.Row="6" Fill="BlanchedAlmond" /> + <TextBlock Grid.Row="6" + Margin="0,7,0,0" + FontSize="14" + Text="Stack Trace" + TextDecorations="Underline" /> + <TextBlock Grid.Row="7" + FontSize="11" + Text="{Binding Path=Exception.StackTrace}" + TextWrapping="Wrap" /> + + </Grid> + </ScrollViewer> + <Button Grid.Row="2" + Grid.Column="1" + Margin="11" + HorizontalAlignment="Right" + VerticalAlignment="Center" + Click="ClearExceptions_Click" + Content="Clear Exceptions" + Padding="7" /> + </Grid> +</UserControl>