mirror of
https://gitee.com/wang-yin1/wpf-visual-process-framework
synced 2026-03-02 15:50:51 +08:00
120 lines
5.7 KiB
Plaintext
120 lines
5.7 KiB
Plaintext
|
|
<b:NodeBase x:Class="ImageCapture.FolderImageNode"
|
||
|
|
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:ImageCapture"
|
||
|
|
xmlns:b="clr-namespace:VisionFrame.Base;assembly=VisionFrame.Base"
|
||
|
|
xmlns:c="clr-namespace:VisionFrame.Base.Converter;assembly=VisionFrame.Base"
|
||
|
|
mc:Ignorable="d"
|
||
|
|
d:DesignHeight="34" d:DesignWidth="140">
|
||
|
|
<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}}"/>
|
||
|
|
<Border CornerRadius="6" Background="White" Margin="3"
|
||
|
|
Visibility="{Binding IsSelected,Converter={StaticResource b2v}}">
|
||
|
|
<Border.Effect>
|
||
|
|
<DropShadowEffect BlurRadius="10"
|
||
|
|
Color="Gray"
|
||
|
|
ShadowDepth="0"
|
||
|
|
Opacity="0.4"/>
|
||
|
|
</Border.Effect>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
|
||
|
|
<Border CornerRadius="5" Background="White"
|
||
|
|
Margin="3" BorderBrush="#771f71e5" BorderThickness="1">
|
||
|
|
<Grid>
|
||
|
|
<Grid.ColumnDefinitions>
|
||
|
|
<ColumnDefinition Width="18"/>
|
||
|
|
<ColumnDefinition/>
|
||
|
|
</Grid.ColumnDefinitions>
|
||
|
|
<Border Background="#771f71e5" CornerRadius="4,0,0,4">
|
||
|
|
<Ellipse Width="8" Height="8" Fill="{Binding IsRunning,Converter={StaticResource b2c}}"/>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
<TextBlock Text="图像加载(F)" Grid.Column="1"
|
||
|
|
VerticalAlignment="Center" Margin="5,0"
|
||
|
|
Foreground="#555"/>
|
||
|
|
<TextBlock Text="{Binding Duration,StringFormat=\{0\}ms}" Grid.Column="1" FontSize="9"
|
||
|
|
VerticalAlignment="Center" HorizontalAlignment="Right"
|
||
|
|
Margin="5,0" Foreground="#888"/>
|
||
|
|
</Grid>
|
||
|
|
</Border>
|
||
|
|
|
||
|
|
|
||
|
|
<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}}"
|
||
|
|
MouseLeftButtonDown="Ellipse_MouseLeftButtonDown"
|
||
|
|
MouseLeftButtonUp="Ellipse_MouseLeftButtonUp"
|
||
|
|
Tag="T"/>
|
||
|
|
<!--下-->
|
||
|
|
<Ellipse Width="12" Height="12" Fill="#9FFF"
|
||
|
|
VerticalAlignment="Bottom"
|
||
|
|
Stroke="#CCC" StrokeThickness="1"
|
||
|
|
Margin="0,0,0,-5"
|
||
|
|
Visibility="{Binding ShowAnchorB,Converter={StaticResource b2v}}"
|
||
|
|
MouseLeftButtonDown="Ellipse_MouseLeftButtonDown"
|
||
|
|
MouseLeftButtonUp="Ellipse_MouseLeftButtonUp"
|
||
|
|
Tag="B"/>
|
||
|
|
<!--左-->
|
||
|
|
<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"
|
||
|
|
MouseLeftButtonUp="Ellipse_MouseLeftButtonUp"
|
||
|
|
Tag="L"/>
|
||
|
|
<!--右-->
|
||
|
|
<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"
|
||
|
|
MouseLeftButtonUp="Ellipse_MouseLeftButtonUp"
|
||
|
|
Tag="R"/>
|
||
|
|
</Grid>
|
||
|
|
<Button Width="16" Height="16"
|
||
|
|
HorizontalAlignment="Right"
|
||
|
|
Content=""
|
||
|
|
Margin="10,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="Right"
|
||
|
|
Margin="28,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>
|