view SilverlightGlimpse/SilverlightGlimpse/Views/LoadExceptionViewer.xaml @ 71:96e6fbd70f49

Latest version
author Steven Hollidge <stevenhollidge@hotmail.com>
date Mon, 23 Apr 2012 14:54:24 +0100
parents SilverlightGlimpse/SilverlightGlimpse/Controls/LoadExceptionViewer.xaml@536498832a79
children
line wrap: on
line source

<UserControl x:Class="SilverlightGlimpse.Views.LoadExceptionViewer"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Border Width="700"
            Height="375"
            Margin="11"
            BorderBrush="SteelBlue"
            BorderThickness="6"
            CornerRadius="5">
        <Grid x:Name="LayoutRoot">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="100" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>

            <Rectangle Fill="SteelBlue" />

            <TextBlock x:Name="txtTitle"
                       Margin="3.5"
                       VerticalAlignment="Center"
                       Foreground="White"
                       Text="Exception source goes here from code behind" />

            <ListBox x:Name="lbExceptions"
                     Grid.Row="1"
                     Margin="3.5"
                     DisplayMemberPath="Message" />

            <ScrollViewer Grid.Row="2"
                          Margin="3.5"
                          Background="White"
                          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" />
                    </Grid.RowDefinitions>

                    <TextBlock Text="Message" TextDecorations="Underline" />
                    <TextBlock Grid.Row="1"
                               Text="{Binding Path=Message}"
                               TextWrapping="Wrap" />

                    <TextBlock Grid.Row="2"
                               Margin="0,11,0,0"
                               Text="Stack Trace"
                               TextDecorations="Underline" />
                    <TextBlock Grid.Row="3"
                               FontSize="11"
                               Text="{Binding Path=StackTrace}"
                               TextWrapping="Wrap" />
                </Grid>
            </ScrollViewer>
        </Grid>
    </Border>

</UserControl>