mirror of
https://gitee.com/wang-yin1/wpf-visual-process-framework
synced 2026-03-03 00:00:56 +08:00
89 lines
4.7 KiB
XML
89 lines
4.7 KiB
XML
<b:NodeBase x:Class="LogicControl.DecisionNode"
|
|
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:LogicControl"
|
|
xmlns:b="clr-namespace:VisionFrame.Base;assembly=VisionFrame.Base"
|
|
xmlns:c="clr-namespace:VisionFrame.Base.Converter;assembly=VisionFrame.Base"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="50" d:DesignWidth="100">
|
|
<UserControl.Resources>
|
|
<BooleanToVisibilityConverter x:Key="b2v"/>
|
|
<c:BoolToBrushConverter x:Key="b2c"/>
|
|
</UserControl.Resources>
|
|
<Grid Name="grid">
|
|
<!--选中状态提醒-->
|
|
<Rectangle Stroke="#999" StrokeThickness="1"
|
|
StrokeDashArray="3,5"
|
|
Visibility="{Binding IsSelected,Converter={StaticResource b2v}}"/>
|
|
<Path Data="M619.787898 44.781759l359.427055 359.500183a152.473125 152.473125 0 0 1 0 215.583104L619.787898 979.292101a152.473125 152.473125 0 0 1-215.656232 0L44.704611 619.791918a152.473125 152.473125 0 0 1 0-215.583104L404.204794 44.781759a152.473125 152.473125 0 0 1 215.656233 0z"
|
|
Fill="#AA1f71e5" Stretch="Fill" Margin="3"
|
|
Stroke="#1f71e5" StrokeThickness="1"/>
|
|
<TextBlock Text="判断" VerticalAlignment="Center" HorizontalAlignment="Center"
|
|
Foreground="#FFF"/>
|
|
<TextBlock Text="F" FontSize="10" VerticalAlignment="Center" HorizontalAlignment="Left"
|
|
Margin="15,0" Foreground="#FFF"/>
|
|
<TextBlock Text="T" FontSize="10" VerticalAlignment="Center" HorizontalAlignment="Right"
|
|
Margin="15,0" Foreground="#FFF"/>
|
|
|
|
|
|
|
|
<Grid Visibility="{Binding ElementName=grid,Path=IsMouseOver,Converter={StaticResource b2v}}">
|
|
<!--锚点对象-->
|
|
<!--上-->
|
|
<Ellipse Width="12" Height="12" Fill="#9FFF"
|
|
VerticalAlignment="Top"
|
|
Stroke="#CCC" StrokeThickness="1"
|
|
Margin="0,-5,0,0"
|
|
Visibility="{Binding ShowAnchorT,Converter={StaticResource b2v}}"
|
|
MouseLeftButtonUp="Ellipse_MouseLeftButtonUp"
|
|
Tag="T"/>
|
|
|
|
<!--左-->
|
|
<Ellipse Width="12" Height="12" Fill="#9FFF"
|
|
HorizontalAlignment="Left"
|
|
Stroke="#CCC" StrokeThickness="1"
|
|
Margin="-5,0,0,0"
|
|
Visibility="{Binding ShowAnchorL,Converter={StaticResource b2v}}"
|
|
MouseLeftButtonDown="Ellipse_MouseLeftButtonDown"
|
|
Tag="L;F"/>
|
|
<!--右-->
|
|
<Ellipse Width="12" Height="12" Fill="#9FFF"
|
|
HorizontalAlignment="Right"
|
|
Stroke="#CCC" StrokeThickness="1"
|
|
Margin="0,0,-5,0"
|
|
Visibility="{Binding ShowAnchorR,Converter={StaticResource b2v}}"
|
|
MouseLeftButtonDown="Ellipse_MouseLeftButtonDown"
|
|
Tag="R;T"/>
|
|
</Grid>
|
|
<Button Width="16" Height="16"
|
|
HorizontalAlignment="Center" VerticalAlignment="Bottom"
|
|
Content=""
|
|
Margin="20,0,0,0"
|
|
Background="#9F00"
|
|
Foreground="#FFF"
|
|
FontFamily="{DynamicResource Iconfont}"
|
|
Style="{DynamicResource DeleteElementButtonStyle}"
|
|
Visibility="{Binding ElementName=grid,
|
|
Path=IsMouseOver,
|
|
Converter={StaticResource b2v}}"
|
|
Command="{Binding DataContext.DeleteElementCommand,RelativeSource={RelativeSource AncestorType=ItemsControl,Mode=FindAncestor}}"
|
|
CommandParameter="{Binding}"/>
|
|
<ToggleButton Width="16" Height="16"
|
|
Tag="8"
|
|
Grid.Column="1"
|
|
HorizontalAlignment="Center" VerticalAlignment="Bottom"
|
|
Margin="0,0,20,0"
|
|
Content=""
|
|
Foreground="White"
|
|
Background="#156FEE"
|
|
FontFamily="{DynamicResource Iconfont}"
|
|
Style="{DynamicResource ElementArgsButtonStyle}"
|
|
Visibility="{Binding ElementName=grid,
|
|
Path=IsMouseOver,
|
|
Converter={StaticResource b2v}}"
|
|
IsChecked="{Binding IsShowProperties}"/>
|
|
</Grid>
|
|
</b:NodeBase>
|