view SilverlightGlimpse/Controls/GlimpseViewer.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 source

<UserControl x:Class="SilverlightGlimpse.Controls.GlimpseViewer"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:c="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
             xmlns:localc="clr-namespace:SilverlightGlimpse.Controls">
    <Grid x:Name="LayoutRoot" Background="Khaki">
        <Grid.Resources>
            <SolidColorBrush x:Name="noExceptionsBrush" Color="LightGreen" />
            <SolidColorBrush x:Name="hasExceptionsBrush" Color="Red" />
        </Grid.Resources>
        <Grid x:Name="layoutInstrumentPanel">
            <StackPanel Orientation="Horizontal">
                <Grid Margin="7">
                    <Ellipse x:Name="elpValidationExceptions"
                             Width="40"
                             Height="40"
                             Fill="LightGreen"
                             Stroke="Brown"
                             StrokeThickness="2" />
                    <TextBlock x:Name="tbValidationExceptions"
                               HorizontalAlignment="Center"
                               VerticalAlignment="Center"
                               FontSize="12"
                               FontWeight="Bold"
                               Text="0"
                               ToolTipService.ToolTip="Binding Exception Count" />
                </Grid>
                <Grid Margin="7">
                    <Ellipse x:Name="elpUnhandledExceptions"
                             Width="40"
                             Height="40"
                             Fill="LightGreen"
                             Stroke="Brown"
                             StrokeThickness="2" />
                    <TextBlock x:Name="tbUnhandledExceptions"
                               HorizontalAlignment="Center"
                               VerticalAlignment="Center"
                               FontSize="12"
                               FontWeight="Bold"
                               Text="0"
                               ToolTipService.ToolTip="Unhandled Exception Count" />
                </Grid>
                <Button x:Name="btnExpand"
                        Margin="7"
                        VerticalAlignment="Center"
                        Content="Expand" />
            </StackPanel>
        </Grid>
        <Grid x:Name="layoutViewer" Visibility="Collapsed">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <TextBlock Margin="3.5"
                       VerticalAlignment="Center"
                       FontSize="18"
                       Foreground="DarkGreen"
                       Text="Glimpse Viewer" />
            <Button x:Name="btnContract"
                    Margin="7"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Center"
                    Content="Contract" />
            <c:TabControl Grid.Row="1"
                          Width="690"
                          Height="390"
                          Background="Khaki"
                          SelectedIndex="2">
                <c:TabItem Header="Exceptions">
                    <localc:ExceptionsViewer />
                </c:TabItem>
                <c:TabItem Header="Bindings with no Source">
                    <localc:BrokenBindingsViewer />
                </c:TabItem>
            </c:TabControl>
        </Grid>
    </Grid>

</UserControl>