<UserControl x:Class="Serein.Workbench.Views.ViewNodeInfoView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:Serein.Workbench.Views"
             xmlns:converter="clr-namespace:Serein.Workbench.Converters"
             xmlns:vm="clr-namespace:Serein.Workbench.ViewModels"
             mc:Ignorable="d" 
             d:DesignHeight="600" d:DesignWidth="300"
             d:DataContext="{d:DesignInstance vm:ViewNodeInfoViewModel}">
    
    <UserControl.Resources>
        <converter:CountToVisibilityConverter x:Key="CountToVisibilityConverter"/>
        <Style  x:Key="InfoTipsTextBlock" TargetType="TextBlock">
            <Setter Property="Width" Value="70"/>
            <Setter Property="MinWidth" Value="70"/>
            <Setter Property="MaxHeight" Value="70"/>
            <Setter Property="HorizontalAlignment" Value="Stretch"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
        </Style>
        <Style  x:Key="InfoValueTextBox" TargetType="TextBox">
            <Setter Property="Width" Value="170"/>
            <Setter Property="MinWidth" Value="170"/>
            <Setter Property="MaxHeight" Value="170"/>
            <Setter Property="HorizontalAlignment" Value="Stretch"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
        </Style>
    </UserControl.Resources>
    
    <Border BorderBrush="Black" BorderThickness="1">
            <!--<ContentControl  />-->
       
        <StackPanel  Grid.Row="0" Margin="10">
            <TextBlock Text="节点信息" HorizontalAlignment="Left"/>
            <StackPanel Margin="1" Orientation="Horizontal">
                <TextBlock Text="节点Guid" Style="{StaticResource InfoTipsTextBlock}" />
                <TextBox Text="{Binding ViewNodeModel.Guid, Mode=TwoWay}" Style="{StaticResource InfoValueTextBox}" IsReadOnly="True"/>
            </StackPanel>
            <StackPanel Margin="1" Orientation="Horizontal">
                <TextBlock Text="节点名称" Style="{StaticResource InfoTipsTextBlock}" />
                <TextBox Text="{Binding ViewNodeModel.DisplayName, Mode=TwoWay}" Style="{StaticResource InfoValueTextBox}" IsReadOnly="True"/>
            </StackPanel>
            <StackPanel Margin="1" Orientation="Horizontal">
                <TextBlock Text="X轴位置" Style="{StaticResource InfoTipsTextBlock}" />
                <TextBox Text="{Binding ViewNodeModel.Position.X, Mode=TwoWay}" Style="{StaticResource InfoValueTextBox}" IsReadOnly="True"/>
            </StackPanel>
            <StackPanel Margin="1" Orientation="Horizontal">
                <TextBlock Text="Y轴位置" Style="{StaticResource InfoTipsTextBlock}" />
                <TextBox Text="{Binding ViewNodeModel.Position.Y, Mode=TwoWay}" Style="{StaticResource InfoValueTextBox}" IsReadOnly="True"/>
            </StackPanel>
        </StackPanel>
    </Border>
</UserControl>
