<!--
	Copyright (c) Microsoft. All rights reserved.
-->

<UserControl x:Class="MOX.ContextualErrors"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
    <UserControl.Resources>
        <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ListBoxItem">
                        <Grid Background="{TemplateBinding Background}" MinHeight="0">
                            <ContentPresenter 
                                HorizontalAlignment="Stretch" 
                                MinHeight="0"
                                Content="{TemplateBinding Content}" 
                                ContentTemplate="{TemplateBinding ContentTemplate}" />
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="IsTabStop" Value="False"/>
        </Style>
    </UserControl.Resources>
    <Border BorderBrush="{CustomResource :mso_brush:2436}" BorderThickness="1" MinWidth="280">
        <Grid Background="{CustomResource :mso_brush:2437}" Opacity="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition Height="auto"/>
            </Grid.RowDefinitions>
            <Rectangle Fill="{CustomResource :mso_brush:2438}" Grid.Row="0" Width="Auto" Height="5" />
            <ListBox x:Name="lvErrorPanes" Grid.Row="1" BorderThickness="0" TabNavigation="Local" MaxHeight="705" Margin="10, 7, 10, 10" ItemContainerStyle="{StaticResource ListBoxItemStyle}" Padding="0" ScrollViewer.VerticalScrollMode="Enabled" >
                <!-- Error panes will be added to ErrorPaneContainer at runtime. -->
            </ListBox>
        </Grid>
    </Border>
</UserControl>
