view Glimpse/Glimpse Controls/ExceptionsViewer.xaml @ 82:352ecaa4fcfd

remove sharpnel
author Steven Hollidge <stevenhollidge@hotmail.com>
date Mon, 23 Apr 2012 23:20:21 +0100
parents 3591c26bd63e
children
line wrap: on
line source

<UserControl 
    x:Class="Glimpse.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 Margin="3.5" Grid.ColumnSpan="2" FontSize="18" Foreground="Red" Text="Exceptions Viewer" VerticalAlignment="Center" />

        <ListBox SelectionChanged="lbExceptions_SelectionChanged" ItemsSource="{Binding}" x:Name="lbExceptions" Margin="3.5" Grid.Row="1" />

        <ScrollViewer DataContext="{Binding ElementName=lbExceptions, Path=SelectedItem}" Grid.Column="1" Grid.Row="1" Margin="3.5">
            <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" Text="Action" TextDecorations="Underline" FontSize="14" />
                <TextBlock Visibility="{Binding ElementName=tbAction, Path=Visibility}" Grid.Row="1" Text="{Binding Path=Action}" FontSize="11" TextWrapping="Wrap" />

                <Rectangle Grid.Row="2" Fill="BlanchedAlmond" />
                <TextBlock Visibility="{Binding ElementName=tbAction, Path=Visibility}" Grid.Row="2" Text="Control Name" TextDecorations="Underline" Margin="0,7,0,0" FontSize="14" />
                <TextBlock Visibility="{Binding ElementName=tbAction, Path=Visibility}" Grid.Row="3" Text="{Binding Path=ControlName}" FontSize="11" TextWrapping="Wrap" />

                <Rectangle Grid.Row="4" Fill="BlanchedAlmond" />
                <TextBlock Grid.Row="4" Text="Message" TextDecorations="Underline" FontSize="14" Margin="0,7,0,0" />
                <TextBlock Grid.Row="5" Text="{Binding Path=Exception.Message}" FontSize="11" TextWrapping="Wrap" />

                <Rectangle Grid.Row="6" Fill="BlanchedAlmond" />
                <TextBlock Grid.Row="6" Text="Stack Trace" TextDecorations="Underline" FontSize="14" Margin="0,7,0,0" />
                <TextBlock Grid.Row="7" Text="{Binding Path=Exception.StackTrace}" FontSize="11" TextWrapping="Wrap" />

            </Grid>
        </ScrollViewer>
        <Button Grid.Column="1" Grid.Row="2" Click="ClearExceptions_Click" Padding="7" Content="Clear Exceptions" Margin="11" HorizontalAlignment="Right" VerticalAlignment="Center" />
    </Grid>

</UserControl>