<UserControl x:Class="AIStudio.Wpf.DiagramDesigner.Controls.PropertiesView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Border x:Name="border" BorderThickness="1" BorderBrush="{DynamicResource GrayBrush8}">
        <Border.Resources>

            <ControlTemplate x:Key="validationErrorTemplate">
                <DockPanel>
                    <Image Source="/AIStudio.Wpf.DiagramDesigner.Additionals;component/Images/error.png" Height="16" Width="16"
							DockPanel.Dock="Right" Margin="-18,0,0,0"
							ToolTip="{Binding ElementName=adorner,
                            Path=AdornedElement.(Validation.Errors)[0].ErrorContent}">
                    </Image>
                    <AdornedElementPlaceholder x:Name="adorner"/>
                </DockPanel>
            </ControlTemplate>

            <Style x:Key="gridLineStyle" TargetType="Line">
                <Setter Property="Stroke" Value="{DynamicResource GrayBrush8}" />
                <Setter Property="Stretch" Value="Fill" />
                <Setter Property="Grid.ZIndex" Value="1000" />
            </Style>

            <Style x:Key="gridHorizontalLineStyle" TargetType="Line" BasedOn="{StaticResource gridLineStyle}">
                <Setter Property="X2" Value="1" />
                <Setter Property="VerticalAlignment" Value="Bottom" />
                <Setter Property="Grid.ColumnSpan" Value="2"/>
            </Style>

            <Style x:Key="gridVerticalLineStyle" TargetType="Line" BasedOn="{StaticResource gridLineStyle}">
                <Setter Property="Y2" Value="1" />
                <Setter Property="HorizontalAlignment" Value="Right" />
                <Setter Property="Grid.RowSpan" Value="1000"/>
            </Style>

        </Border.Resources>
        <DockPanel x:Name="_panel">
            <Border x:Name="_label" Width="50" Height="16">
                <TextBlock Text="Empty" TextAlignment="Center" Foreground="Gray"/>
            </Border>
            <ScrollViewer x:Name="_gridContainer" VerticalScrollBarVisibility="Auto">
                <Grid x:Name="_grid">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    
                    <Line Name="_vLine" Grid.Column="0" Grid.RowSpan="1000" Style="{StaticResource gridVerticalLineStyle}"/>
                    <GridSplitter Name="_splitter" Grid.RowSpan="1000"  Margin="0,0,0,0" Width="1" 
                                  Background="{DynamicResource GrayBrush8}" Grid.ZIndex="10000"/>
                    
                </Grid>
            </ScrollViewer>
        </DockPanel>
    </Border>
</UserControl>
