删除原有的上 下,删 按钮方式的操作逻辑,改用拖动,和左键激活
This commit is contained in:
@@ -68,32 +68,30 @@
|
||||
Background="#F5F5F5"
|
||||
BorderBrush="{StaticResource PanelBorder}"
|
||||
BorderThickness="0,1,0,1">
|
||||
<Grid>
|
||||
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
|
||||
<Button
|
||||
Command="{Binding NewPipelineCommand}"
|
||||
Content="新建"
|
||||
Style="{StaticResource ToolbarBtn}"
|
||||
ToolTip="新建流水线" />
|
||||
<Button
|
||||
Command="{Binding SavePipelineCommand}"
|
||||
Content="保存"
|
||||
Style="{StaticResource ToolbarBtn}"
|
||||
ToolTip="保存当前流水线" />
|
||||
<Button
|
||||
Width="60"
|
||||
Command="{Binding SaveAsPipelineCommand}"
|
||||
Content="另存为"
|
||||
Style="{StaticResource ToolbarBtn}"
|
||||
ToolTip="另存当前流水线" />
|
||||
<Button
|
||||
Width="52"
|
||||
Command="{Binding LoadPipelineCommand}"
|
||||
Content="加载"
|
||||
Style="{StaticResource ToolbarBtn}"
|
||||
ToolTip="加载流水线" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
|
||||
<Button
|
||||
Command="{Binding NewPipelineCommand}"
|
||||
Content="新建"
|
||||
Style="{StaticResource ToolbarBtn}"
|
||||
ToolTip="新建流水线" />
|
||||
<Button
|
||||
Command="{Binding SavePipelineCommand}"
|
||||
Content="保存"
|
||||
Style="{StaticResource ToolbarBtn}"
|
||||
ToolTip="保存当前流水线" />
|
||||
<Button
|
||||
Width="60"
|
||||
Command="{Binding SaveAsPipelineCommand}"
|
||||
Content="另存为"
|
||||
Style="{StaticResource ToolbarBtn}"
|
||||
ToolTip="另存当前流水线" />
|
||||
<Button
|
||||
Width="52"
|
||||
Command="{Binding LoadPipelineCommand}"
|
||||
Content="加载"
|
||||
Style="{StaticResource ToolbarBtn}"
|
||||
ToolTip="加载流水线" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<ListBox
|
||||
@@ -120,7 +118,6 @@
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="44" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Line
|
||||
@@ -176,54 +173,6 @@
|
||||
Foreground="#6E6E6E"
|
||||
Text="已启用" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel
|
||||
x:Name="NodeActions"
|
||||
Grid.Column="2"
|
||||
Margin="0,0,4,0"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal"
|
||||
Visibility="Collapsed">
|
||||
<Button
|
||||
Width="22"
|
||||
Height="22"
|
||||
Margin="1,0"
|
||||
Background="Transparent"
|
||||
BorderBrush="#CDCBCB"
|
||||
BorderThickness="1"
|
||||
Command="{Binding DataContext.MoveNodeUpCommand, RelativeSource={RelativeSource AncestorType=ListBox}}"
|
||||
CommandParameter="{Binding}"
|
||||
Content="上"
|
||||
Cursor="Hand"
|
||||
FontSize="10"
|
||||
ToolTip="上移" />
|
||||
<Button
|
||||
Width="22"
|
||||
Height="22"
|
||||
Margin="1,0"
|
||||
Background="Transparent"
|
||||
BorderBrush="#CDCBCB"
|
||||
BorderThickness="1"
|
||||
Command="{Binding DataContext.MoveNodeDownCommand, RelativeSource={RelativeSource AncestorType=ListBox}}"
|
||||
CommandParameter="{Binding}"
|
||||
Content="下"
|
||||
Cursor="Hand"
|
||||
FontSize="10"
|
||||
ToolTip="下移" />
|
||||
<Button
|
||||
Width="22"
|
||||
Height="22"
|
||||
Margin="1,0"
|
||||
Background="Transparent"
|
||||
BorderBrush="#E05050"
|
||||
BorderThickness="1"
|
||||
Command="{Binding DataContext.RemoveOperatorCommand, RelativeSource={RelativeSource AncestorType=ListBox}}"
|
||||
CommandParameter="{Binding}"
|
||||
Content="删"
|
||||
Cursor="Hand"
|
||||
FontSize="10"
|
||||
ToolTip="删除" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
<DataTemplate.Triggers>
|
||||
@@ -254,9 +203,6 @@
|
||||
<Setter TargetName="NodeContainer" Property="BorderBrush" Value="#7E9AB6" />
|
||||
<Setter TargetName="NodeContainer" Property="Opacity" Value="1" />
|
||||
</MultiDataTrigger>
|
||||
<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