#0026 图像工具箱新增移动和删除
This commit is contained in:
@@ -161,10 +161,11 @@
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid MinHeight="48">
|
||||
<Grid x:Name="NodeRoot" MinHeight="48">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="44" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- 连接线列:上半段 + 下半段 -->
|
||||
@@ -196,11 +197,38 @@
|
||||
Margin="6,0,0,0"
|
||||
FontFamily="Microsoft YaHei UI" FontSize="12"
|
||||
Text="{Binding DisplayName}" />
|
||||
|
||||
<!-- 操作按钮:上移 / 下移 / 删除(悬停显示) -->
|
||||
<StackPanel x:Name="NodeActions"
|
||||
Grid.Column="2"
|
||||
Orientation="Horizontal"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,4,0"
|
||||
Visibility="Collapsed">
|
||||
<Button Content="▲" ToolTip="上移" Width="22" Height="22"
|
||||
Margin="1,0" FontSize="10" Cursor="Hand"
|
||||
Background="Transparent" BorderBrush="#cdcbcb" BorderThickness="1"
|
||||
Command="{Binding DataContext.MoveNodeUpCommand, RelativeSource={RelativeSource AncestorType=ListBox}}"
|
||||
CommandParameter="{Binding}" />
|
||||
<Button Content="▼" ToolTip="下移" Width="22" Height="22"
|
||||
Margin="1,0" FontSize="10" Cursor="Hand"
|
||||
Background="Transparent" BorderBrush="#cdcbcb" BorderThickness="1"
|
||||
Command="{Binding DataContext.MoveNodeDownCommand, RelativeSource={RelativeSource AncestorType=ListBox}}"
|
||||
CommandParameter="{Binding}" />
|
||||
<Button Content="✕" ToolTip="删除" Width="22" Height="22"
|
||||
Margin="1,0" FontSize="10" Cursor="Hand"
|
||||
Background="Transparent" BorderBrush="#E05050" BorderThickness="1"
|
||||
Command="{Binding DataContext.RemoveOperatorCommand, RelativeSource={RelativeSource AncestorType=ListBox}}"
|
||||
CommandParameter="{Binding}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding Order}" Value="0">
|
||||
<Setter TargetName="TopLine" Property="Visibility" Value="Collapsed" />
|
||||
</DataTrigger>
|
||||
<Trigger SourceName="NodeRoot" Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="NodeActions" Property="Visibility" Value="Visible" />
|
||||
</Trigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
|
||||
Reference in New Issue
Block a user