<local:NodeControlBase x:Class="Serein.Workbench.Node.View.GlobalDataControl"
             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.Node.View"  
             xmlns:vm="clr-namespace:Serein.Workbench.Node.ViewModel"
             d:DataContext="{d:DesignInstance vm:GlobalDataNodeControlViewModel}"
             mc:Ignorable="d"
             MaxWidth="500">
    <UserControl.Resources>
        <BooleanToVisibilityConverter x:Key="BoolToVis" />
    </UserControl.Resources>


    <Grid Background="#FEFAF4">
        <!--<Grid.ToolTip>
            <ToolTip Background="LightYellow" Foreground="Black" Content="{Binding NodeModel.MethodDetails.MethodAnotherName, UpdateSourceTrigger=PropertyChanged}" />
        </Grid.ToolTip>-->

        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <Grid Grid.Row="0" Background="#E7EFF5" >
            <!--<Grid Grid.Row="0" >-->
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="auto"/>
            </Grid.ColumnDefinitions>

            <local:ExecuteJunctionControl  Grid.Column="0"  NodeViewModel="{Binding}" x:Name="ExecuteJunctionControl" HorizontalAlignment="Left" Grid.RowSpan="2"/>
            <Border Grid.Column="1" BorderThickness="1" HorizontalAlignment="Stretch">
                <TextBlock Text="{Binding NodeModel.DisplayName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Center"/>
            </Border>
            <local:NextStepJunctionControl Grid.Column="2"  NodeViewModel="{Binding}"  x:Name="NextStepJunctionControl" HorizontalAlignment="Right" Grid.RowSpan="2"/>

        </Grid>

        <Grid Grid.Row="1"   HorizontalAlignment="Stretch" Margin="4">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>

            <StackPanel Grid.Row="0"  Grid.Column="0" Orientation="Horizontal">
                <TextBlock Text="全局数据名称" Margin="2"  HorizontalAlignment="Stretch" VerticalAlignment="Center"/>
                <TextBox IsEnabled="{Binding IsEnabledOnView}" MinWidth="50" Margin="2" Text="{Binding NodeModel.KeyName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
      HorizontalAlignment="Stretch" VerticalAlignment="Center">
                </TextBox>
                <!--<Button Content="EXP" Command="{Binding CommandCopyDataExp}" Height="17.2"></Button>-->
                <!--<Button Content="刷新 " Command="{Binding CommandCopyDataExp}" Height="17.2" Margin="2,0,0,0"></Button>-->
            </StackPanel>
            
            <StackPanel x:Name="GlobalDataPanel"
                        Grid.Row="1" 
                        Grid.ColumnSpan="2" 
                        Orientation="Horizontal" 
                        HorizontalAlignment="Center"
                        >
                
            </StackPanel>
            <!--<StackPanel Grid.Row="1"  Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Left">
                <local:ResultJunctionControl Grid.Column="2"  MyNode="{Binding NodelModel}" x:Name="ResultJunctionControl" HorizontalAlignment="Right"/>
                <TextBlock  Text="设置数据源" Margin="2"  HorizontalAlignment="Stretch" VerticalAlignment="Center"/>
            </StackPanel>-->
            
        </Grid>


        <!--<themes:MethodDetailsControl Grid.Row="1" MethodDetails="{Binding MethodDetails}" />
     <Border Grid.Row="2" Background="#EAFFD0" BorderBrush="#EAFFD0" BorderThickness="1">
         <TextBlock Text="{Binding MethodDetails.MethodTips, Converter={StaticResource TypeToStringConverter}, StringFormat=return:{0}, UpdateSourceTrigger=PropertyChanged}" 
                    HorizontalAlignment="Center" 
                    VerticalAlignment="Center"/>
     </Border>-->
    </Grid>
</local:NodeControlBase>
