mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-03 00:00:49 +08:00
74 lines
4.0 KiB
XML
74 lines
4.0 KiB
XML
<local:NodeControlBase x:Class="Serein.WorkBench.Node.View.ConditionNodeControl"
|
|
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"
|
|
xmlns:themes="clr-namespace:Serein.WorkBench.Themes">
|
|
|
|
<!--d:DataContext="{d:DesignInstance Type=vm:ConditionNodeControlViewModel}"-->
|
|
<UserControl.Resources>
|
|
<!--<vm:TypeToStringConverter x:Key="TypeToStringConverter"/>-->
|
|
<BooleanToVisibilityConverter x:Key="BoolToVis" />
|
|
</UserControl.Resources>
|
|
|
|
|
|
<Grid>
|
|
<Grid.ToolTip>
|
|
<ToolTip Background="LightYellow" Foreground="Black" Content="{Binding MethodDetails.MethodTips, UpdateSourceTrigger=PropertyChanged}" />
|
|
</Grid.ToolTip>
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<Border Grid.Row="0" Background="#A8D8EA" BorderBrush="#A8D8EA" BorderThickness="1" HorizontalAlignment="Stretch">
|
|
<TextBlock Text="条件节点" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
</Border>
|
|
<Grid Grid.Row="1" Background="#F1FFDF" HorizontalAlignment="Stretch">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="20"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<CheckBox Grid.Column="0" IsChecked="{Binding IsCustomData, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/> <!--Converter={StaticResource BoolToVis}-->
|
|
<TextBox Grid.Column="1" MinWidth="50" Text="{Binding CustomData, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
HorizontalAlignment="Stretch" VerticalAlignment="Center">
|
|
<TextBox.Style>
|
|
<Style TargetType="TextBox">
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsCustomData}" Value="True">
|
|
<Setter Property="Visibility" Value="Visible" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBox.Style>
|
|
</TextBox>
|
|
|
|
<TextBlock Grid.Column="1" MinWidth="50" Text="上一节点数据" HorizontalAlignment="Stretch" VerticalAlignment="Center">
|
|
<TextBlock.Style>
|
|
<Style TargetType="TextBlock">
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding IsCustomData}" Value="False">
|
|
<Setter Property="Visibility" Value="Visible" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
</Grid>
|
|
<TextBox Grid.Row="2" Background="#f1F66F" MinWidth="100" Text="{Binding Expression, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
HorizontalAlignment="Stretch" VerticalAlignment="Center"/>
|
|
|
|
<!--<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>
|