#0029 调整页面预览

This commit is contained in:
zhengxuan.zhang
2026-03-15 20:26:58 +08:00
parent e79fc288c0
commit 06cc42ff33
4 changed files with 99 additions and 53 deletions
@@ -6,7 +6,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
d:DesignHeight="700"
d:DesignWidth="400"
d:DesignWidth="350"
mc:Ignorable="d">
<UserControl.Resources>
@@ -119,15 +119,17 @@
Style="{StaticResource ToolbarBtn}"
ToolTip="保存流水线" />
<Button
Width="43"
Command="{Binding SaveAsPipelineCommand}"
Content="另存为"
Style="{StaticResource ToolbarBtn}"
ToolTip="另存为" Width="43" />
ToolTip="另存为" />
<Button
Width="43"
Command="{Binding LoadPipelineCommand}"
Content="加载"
Style="{StaticResource ToolbarBtn}"
ToolTip="加载流水线" Width="43" />
ToolTip="加载流水线" />
<Button
Command="{Binding ExecutePipelineCommand}"
Content="▶"
@@ -157,8 +159,8 @@
BorderThickness="0"
ItemContainerStyle="{StaticResource PipelineNodeItemStyle}"
ItemsSource="{Binding PipelineNodes}"
SelectedItem="{Binding SelectedNode, Mode=TwoWay}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
SelectedItem="{Binding SelectedNode, Mode=TwoWay}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid x:Name="NodeRoot" MinHeight="48">
@@ -169,57 +171,100 @@
</Grid.ColumnDefinitions>
<!-- 连接线列:上半段 + 下半段 -->
<Line x:Name="TopLine"
Stroke="#5B9BD5" StrokeThickness="2"
X1="0" X2="0" Y1="0" Y2="10"
<Line
x:Name="TopLine"
HorizontalAlignment="Center"
VerticalAlignment="Top"
HorizontalAlignment="Center" />
<Line Stroke="#5B9BD5" StrokeThickness="2"
X1="0" X2="0" Y1="0" Y2="14"
Stroke="#5B9BD5"
StrokeThickness="2"
X1="0"
X2="0"
Y1="0"
Y2="10" />
<Line
HorizontalAlignment="Center"
VerticalAlignment="Bottom"
HorizontalAlignment="Center" />
Stroke="#5B9BD5"
StrokeThickness="2"
X1="0"
X2="0"
Y1="0"
Y2="14" />
<!-- 算子图标 -->
<Border Grid.Column="0"
Width="28" Height="28"
Background="#E8F0FE"
BorderBrush="#5B9BD5" BorderThickness="1.5"
CornerRadius="4"
<Border
Grid.Column="0"
Width="28"
Height="28"
HorizontalAlignment="Center"
VerticalAlignment="Center"
HorizontalAlignment="Center">
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"
FontSize="13" Text="⚙" />
Background="#E8F0FE"
BorderBrush="#5B9BD5"
BorderThickness="1.5"
CornerRadius="4">
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="13"
Text="⚙" />
</Border>
<!-- 算子名称 -->
<TextBlock Grid.Column="1"
VerticalAlignment="Center"
<TextBlock
Grid.Column="1"
Margin="6,0,0,0"
FontFamily="Microsoft YaHei UI" FontSize="12"
VerticalAlignment="Center"
FontFamily="Microsoft YaHei UI"
FontSize="12"
Text="{Binding DisplayName}" />
<!-- 操作按钮:上移 / 下移 / 删除(悬停显示) -->
<StackPanel x:Name="NodeActions"
<StackPanel
x:Name="NodeActions"
Grid.Column="2"
Orientation="Horizontal"
VerticalAlignment="Center"
Margin="0,0,4,0"
VerticalAlignment="Center"
Orientation="Horizontal"
Visibility="Collapsed">
<Button Content="▲" ToolTip="上移" Width="22" Height="22"
Margin="1,0" FontSize="10" Cursor="Hand"
Background="Transparent" BorderBrush="#cdcbcb" BorderThickness="1"
<Button
Width="22"
Height="22"
Margin="1,0"
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"
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}" />
<Button Content="✕" ToolTip="删除" Width="22" Height="22"
Margin="1,0" FontSize="10" Cursor="Hand"
Background="Transparent" BorderBrush="#E05050" BorderThickness="1"
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}" />
CommandParameter="{Binding}"
Content="✕"
Cursor="Hand"
FontSize="10"
ToolTip="删除" />
</StackPanel>
</Grid>
<DataTemplate.Triggers>
+2 -1
View File
@@ -4,6 +4,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:views="clr-namespace:XplorePlane.Views"
d:DesignHeight="400"
d:DesignWidth="250"
mc:Ignorable="d">
@@ -16,6 +17,6 @@
<TextBlock Margin="8,4" HorizontalAlignment="Left" VerticalAlignment="Center"
FontWeight="SemiBold" Foreground="#333333" Text="图像" />
</Border>
<Grid Grid.Row="1" />
<views:PipelineEditorView Grid.Row="1" />
</Grid>
</UserControl>
+3 -3
View File
@@ -11,7 +11,7 @@
x:Name="ParentWindow"
Title="XplorePlane"
Width="1280"
Height="798"
Height="1000"
d:DesignWidth="1280"
Background="#F5F5F5"
WindowStartupLocation="CenterScreen"
@@ -28,7 +28,7 @@
<Grid x:Name="LayoutRoot">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="28*" />
<ColumnDefinition Width="95*" />
<ColumnDefinition Width="1157*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
@@ -1737,7 +1737,7 @@
<Grid.ColumnDefinitions>
<ColumnDefinition Width="180" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="200" />
<ColumnDefinition Width="350" />
<ColumnDefinition Width="350" />
</Grid.ColumnDefinitions>
@@ -23,7 +23,7 @@
VerticalAlignment="Center"
FontWeight="SemiBold"
Foreground="#333333"
Text="2D" />
Text="实时图像" />
</Border>
<TextBlock
Grid.Row="1"