<UserControl xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d" d:DesignWidth="390" d:DesignHeight="40"
             x:Class="Serein.Workbench.Avalonia.Custom.Views.ParameterDetailsInfoView"
             xmlns:vm="clr-namespace:Serein.Workbench.Avalonia.Custom.ViewModels"
             xmlns:cv="clr-namespace:Serein.Workbench.Avalonia.Custom.Views"
             xmlns:baselibrary="clr-namespace:Serein.Library;assembly=Serein.Library"
             xmlns:converter="using:Serein.Workbench.Avalonia.Converters"
             x:DataType="vm:ParameterDetailsViewModel"
             VerticalAlignment="Center">
  <Design.DataContext>
    <vm:ParameterDetailsViewModel/>
  </Design.DataContext>
  <StackPanel >
    <StackPanel.Resources>
      <converter:IsVisibleOfParameterConverter x:Key="visibleConverter"/>
      
      
    </StackPanel.Resources>



    <Grid ColumnDefinitions="20,40,90,*"  Margin="6,0,10,0">
      
      <!--<ToolTip.Tip>
        <StackPanel>
          
        </StackPanel>
      </ToolTip.Tip>-->
      <!--<ToolTip Background="LightYellow" Foreground="#071042" Content="" />-->
      
      <cv:NodeJunctionView Grid.Column="0" JunctionType="ArgData" ArgIndex="{Binding ParameterDetails.Index}" MyNode="{Binding ParameterDetails.NodeModel}" Width="30" Height="15" Margin="2" HorizontalAlignment="Center" VerticalAlignment="Center" />
      
      <!--指定参数-->
      <CheckBox Grid.Column="1" IsChecked="{Binding ParameterDetails.IsExplicitData, Mode=TwoWay}" HorizontalAlignment="Center" VerticalAlignment="Center" >
        
      </CheckBox>
      <!--参数名称-->
      <TextBlock Grid.Column="2"  Text="{Binding ParameterDetails.Name}" FontSize="14"
                 HorizontalAlignment="Left" VerticalAlignment="Center" 
                  ToolTip.Placement="Bottom" ToolTip.VerticalOffset="6">
        <ToolTip.Tip>
          <StackPanel>
            <TextBlock Text="{Binding ParameterDetails}" FontSize="14" TextTrimming="None" TextWrapping="WrapWithOverflow"/>
          </StackPanel>
        </ToolTip.Tip>
      </TextBlock>
      <!--参数内容-->
      <TextBlock Grid.Column="3" IsVisible="{Binding IsVisibleA}" FontSize="14" Text="   [ 自动取参 ]"  
                 MinWidth="120" MaxWidth="300" HorizontalAlignment="Left" VerticalAlignment="Center" />
      <TextBox Grid.Column="3" IsVisible="{Binding IsVisibleB}"  FontSize="14" Text="{Binding ParameterDetails.DataValue, Mode=TwoWay}"  
               MinWidth="120" MaxWidth="300" HorizontalAlignment="Left" VerticalAlignment="Center" />
      <ComboBox Grid.Column="3"  IsVisible="{Binding IsVisibleC}" 
                ItemsSource="{Binding ParameterDetails.Items}"
                SelectedValue="{Binding ParameterDetails.DataValue,Mode=OneTime}"
                MinWidth="120" MaxWidth="300"
                HorizontalAlignment="Left" VerticalAlignment="Center">
        <ComboBox.ItemTemplate>
          <DataTemplate>
            <TextBlock Text="{Binding}" FontFamily="{Binding}" FontSize="14"/>
          </DataTemplate>
        </ComboBox.ItemTemplate>
      </ComboBox>
    </Grid>
  </StackPanel>

</UserControl>
