|
|
|
@ -5,9 +5,10 @@ |
|
|
|
xmlns:vm="using:AuroraDesk.Presentation.ViewModels.Pages" |
|
|
|
xmlns:reactive="using:ReactiveUI.Avalonia" |
|
|
|
xmlns:entities="using:AuroraDesk.Core.Entities" |
|
|
|
xmlns:converters="using:AuroraDesk.Presentation.Converters" |
|
|
|
xmlns:heroicons="clr-namespace:HeroIconsAvalonia.Controls;assembly=HeroIconsAvalonia" |
|
|
|
xmlns:converters="using:AuroraDesk.Presentation.Converters" |
|
|
|
xmlns:heroicons="clr-namespace:HeroIconsAvalonia.Controls;assembly=HeroIconsAvalonia" |
|
|
|
xmlns:controls="clr-namespace:AuroraDesk.Presentation.Controls" |
|
|
|
xmlns:cp="clr-namespace:Avalonia.Controls;assembly=Avalonia.Controls.ColorPicker" |
|
|
|
mc:Ignorable="d" d:DesignWidth="1200" d:DesignHeight="800" |
|
|
|
x:Class="AuroraDesk.Presentation.Views.Pages.NodeCanvasPageView" |
|
|
|
x:DataType="vm:NodeCanvasPageViewModel" |
|
|
|
@ -21,6 +22,7 @@ |
|
|
|
<converters:IsNullConverter x:Key="IsNullConverter"/> |
|
|
|
<converters:DoubleToStringConverter x:Key="DoubleToStringConverter"/> |
|
|
|
<converters:ColorHexToBrushConverter x:Key="ColorHexToBrushConverter"/> |
|
|
|
<converters:ColorHexToColorConverter x:Key="ColorHexToColorConverter"/> |
|
|
|
<converters:ConnectorAttachmentModeToTextConverter x:Key="ConnectorAttachmentModeToTextConverter"/> |
|
|
|
<converters:ConnectionPointsToInputsConverter x:Key="ConnectionPointsToInputsConverter"/> |
|
|
|
<converters:ConnectionPointsToOutputsConverter x:Key="ConnectionPointsToOutputsConverter"/> |
|
|
|
@ -338,6 +340,7 @@ |
|
|
|
BorderBrush="{Binding IsSelected, Converter={StaticResource BooleanToBorderBrushConverter}}" |
|
|
|
BorderThickness="{Binding IsSelected, Converter={StaticResource BooleanToBorderThicknessConverter}}" |
|
|
|
BoxShadow="0 2 8 0 #00000015" |
|
|
|
ClipToBounds="False" |
|
|
|
Canvas.Left="{Binding X}" |
|
|
|
Canvas.Top="{Binding Y}"> |
|
|
|
<Grid ColumnDefinitions="Auto,*,Auto" |
|
|
|
@ -352,7 +355,8 @@ |
|
|
|
VerticalAlignment="Center"> |
|
|
|
<ItemsControl.ItemsPanel> |
|
|
|
<ItemsPanelTemplate> |
|
|
|
<controls:ConnectorColumnPanel VerticalAlignment="Stretch"/> |
|
|
|
<controls:ConnectorColumnPanel VerticalAlignment="Stretch" |
|
|
|
Side="Left"/> |
|
|
|
</ItemsPanelTemplate> |
|
|
|
</ItemsControl.ItemsPanel> |
|
|
|
<ItemsControl.ItemTemplate> |
|
|
|
@ -399,7 +403,8 @@ |
|
|
|
VerticalAlignment="Center"> |
|
|
|
<ItemsControl.ItemsPanel> |
|
|
|
<ItemsPanelTemplate> |
|
|
|
<controls:ConnectorColumnPanel VerticalAlignment="Stretch"/> |
|
|
|
<controls:ConnectorColumnPanel VerticalAlignment="Stretch" |
|
|
|
Side="Right"/> |
|
|
|
</ItemsPanelTemplate> |
|
|
|
</ItemsControl.ItemsPanel> |
|
|
|
<ItemsControl.ItemTemplate> |
|
|
|
@ -477,6 +482,15 @@ |
|
|
|
<Setter Property="FontFamily" Value="Microsoft YaHei, Segoe UI, Arial"/> |
|
|
|
<Setter Property="UseLayoutRounding" Value="True"/> |
|
|
|
</Style> |
|
|
|
<Style Selector="cp|ColorPicker"> |
|
|
|
<Setter Property="HorizontalAlignment" Value="Stretch"/> |
|
|
|
<Setter Property="BorderBrush" Value="{StaticResource BorderLight}"/> |
|
|
|
<Setter Property="BorderThickness" Value="1"/> |
|
|
|
<Setter Property="CornerRadius" Value="6"/> |
|
|
|
<Setter Property="Background" Value="{StaticResource BackgroundWhite}"/> |
|
|
|
<Setter Property="Foreground" Value="{StaticResource TextPrimary}"/> |
|
|
|
<Setter Property="MinHeight" Value="32"/> |
|
|
|
</Style> |
|
|
|
<Style Selector="TextBlock"> |
|
|
|
<Setter Property="FontFamily" Value="Microsoft YaHei, Segoe UI, Arial"/> |
|
|
|
<Setter Property="UseLayoutRounding" Value="True"/> |
|
|
|
@ -496,41 +510,67 @@ |
|
|
|
FontWeight="SemiBold" |
|
|
|
Foreground="{StaticResource TextPrimary}"/> |
|
|
|
|
|
|
|
<Grid ColumnDefinitions="140,*" |
|
|
|
RowDefinitions="Auto,Auto,Auto" |
|
|
|
UseLayoutRounding="True"> |
|
|
|
<TextBlock Grid.Row="0" |
|
|
|
Text="名称" |
|
|
|
Margin="0,0,12,6" |
|
|
|
FontSize="12" |
|
|
|
Foreground="{StaticResource TextSecondary}"/> |
|
|
|
<TextBox Grid.Row="0" |
|
|
|
Grid.Column="1" |
|
|
|
Text="{Binding SelectedNode.Title, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
|
|
|
Watermark="请输入名称"/> |
|
|
|
<Border BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="1" |
|
|
|
CornerRadius="4"> |
|
|
|
<Grid ColumnDefinitions="110,*" |
|
|
|
RowDefinitions="Auto,Auto,Auto" |
|
|
|
UseLayoutRounding="True"> |
|
|
|
<Border Grid.Row="0" |
|
|
|
Grid.Column="0" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="0,0,1,1" |
|
|
|
Padding="10,8"> |
|
|
|
<TextBlock Text="名称" |
|
|
|
FontSize="12" |
|
|
|
Foreground="{StaticResource TextSecondary}"/> |
|
|
|
</Border> |
|
|
|
<Border Grid.Row="0" |
|
|
|
Grid.Column="1" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="1,0,0,1" |
|
|
|
Padding="10,4"> |
|
|
|
<TextBox Text="{Binding SelectedNode.Title, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
|
|
|
Watermark="请输入名称"/> |
|
|
|
</Border> |
|
|
|
|
|
|
|
<TextBlock Grid.Row="1" |
|
|
|
Text="宽度" |
|
|
|
Margin="0,8,12,6" |
|
|
|
FontSize="12" |
|
|
|
Foreground="{StaticResource TextSecondary}"/> |
|
|
|
<TextBox Grid.Row="1" |
|
|
|
Grid.Column="1" |
|
|
|
Margin="0,8,0,0" |
|
|
|
Text="{Binding SelectedNode.Width, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource DoubleToStringConverter}}" |
|
|
|
Watermark="0"/> |
|
|
|
<Border Grid.Row="1" |
|
|
|
Grid.Column="0" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="0,0,1,1" |
|
|
|
Padding="10,8"> |
|
|
|
<TextBlock Text="宽度" |
|
|
|
FontSize="12" |
|
|
|
Foreground="{StaticResource TextSecondary}"/> |
|
|
|
</Border> |
|
|
|
<Border Grid.Row="1" |
|
|
|
Grid.Column="1" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="1,0,0,1" |
|
|
|
Padding="10,4"> |
|
|
|
<TextBox Text="{Binding SelectedNode.Width, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource DoubleToStringConverter}}" |
|
|
|
Watermark="0"/> |
|
|
|
</Border> |
|
|
|
|
|
|
|
<TextBlock Grid.Row="2" |
|
|
|
Text="高度" |
|
|
|
Margin="0,8,12,0" |
|
|
|
FontSize="12" |
|
|
|
Foreground="{StaticResource TextSecondary}"/> |
|
|
|
<TextBox Grid.Row="2" |
|
|
|
Grid.Column="1" |
|
|
|
Margin="0,8,0,0" |
|
|
|
Text="{Binding SelectedNode.Height, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource DoubleToStringConverter}}" |
|
|
|
Watermark="0"/> |
|
|
|
</Grid> |
|
|
|
<Border Grid.Row="2" |
|
|
|
Grid.Column="0" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="0,0,1,0" |
|
|
|
Padding="10,8"> |
|
|
|
<TextBlock Text="高度" |
|
|
|
FontSize="12" |
|
|
|
Foreground="{StaticResource TextSecondary}"/> |
|
|
|
</Border> |
|
|
|
<Border Grid.Row="2" |
|
|
|
Grid.Column="1" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="1,0,0,0" |
|
|
|
Padding="10,4"> |
|
|
|
<TextBox Text="{Binding SelectedNode.Height, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource DoubleToStringConverter}}" |
|
|
|
Watermark="0"/> |
|
|
|
</Border> |
|
|
|
</Grid> |
|
|
|
</Border> |
|
|
|
</StackPanel> |
|
|
|
</Border> |
|
|
|
|
|
|
|
@ -545,188 +585,280 @@ |
|
|
|
FontWeight="SemiBold" |
|
|
|
Foreground="{StaticResource TextPrimary}"/> |
|
|
|
|
|
|
|
<StackPanel Spacing="12"> |
|
|
|
<StackPanel Spacing="4"> |
|
|
|
<TextBlock Text="显示位置" |
|
|
|
<Border BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="1" |
|
|
|
CornerRadius="4"> |
|
|
|
<Grid ColumnDefinitions="110,*" |
|
|
|
RowDefinitions="Auto,Auto"> |
|
|
|
<Border Grid.Row="0" |
|
|
|
Grid.Column="0" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="0,0,1,1" |
|
|
|
Padding="10,8"> |
|
|
|
<TextBlock Text="左侧数量" |
|
|
|
FontSize="12" |
|
|
|
Foreground="{StaticResource TextSecondary}"/> |
|
|
|
<ComboBox SelectedItem="{Binding SelectedConnectorMode, Mode=TwoWay}"> |
|
|
|
<ComboBox.ItemTemplate> |
|
|
|
<DataTemplate> |
|
|
|
<TextBlock Text="{Binding Converter={StaticResource ConnectorAttachmentModeToTextConverter}}"/> |
|
|
|
</DataTemplate> |
|
|
|
</ComboBox.ItemTemplate> |
|
|
|
<ComboBox.Items> |
|
|
|
<entities:ConnectorAttachmentMode>None</entities:ConnectorAttachmentMode> |
|
|
|
<entities:ConnectorAttachmentMode>LeftOnly</entities:ConnectorAttachmentMode> |
|
|
|
<entities:ConnectorAttachmentMode>RightOnly</entities:ConnectorAttachmentMode> |
|
|
|
<entities:ConnectorAttachmentMode>Both</entities:ConnectorAttachmentMode> |
|
|
|
</ComboBox.Items> |
|
|
|
</ComboBox> |
|
|
|
</StackPanel> |
|
|
|
</Border> |
|
|
|
<Border Grid.Row="0" |
|
|
|
Grid.Column="1" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="1,0,0,1" |
|
|
|
Padding="10,4"> |
|
|
|
<ComboBox ItemsSource="{Binding ConnectorCountOptions}" |
|
|
|
SelectedItem="{Binding SelectedLeftConnectorCount, Mode=TwoWay}"/> |
|
|
|
</Border> |
|
|
|
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="12"> |
|
|
|
<StackPanel Width="140" Spacing="4"> |
|
|
|
<TextBlock Text="左侧数量" |
|
|
|
FontSize="12" |
|
|
|
Foreground="{StaticResource TextSecondary}"/> |
|
|
|
<ComboBox ItemsSource="{Binding ConnectorCountOptions}" |
|
|
|
SelectedItem="{Binding SelectedLeftConnectorCount, Mode=TwoWay}"/> |
|
|
|
</StackPanel> |
|
|
|
<StackPanel Width="140" Spacing="4"> |
|
|
|
<TextBlock Text="右侧数量" |
|
|
|
FontSize="12" |
|
|
|
Foreground="{StaticResource TextSecondary}"/> |
|
|
|
<ComboBox ItemsSource="{Binding ConnectorCountOptions}" |
|
|
|
SelectedItem="{Binding SelectedRightConnectorCount, Mode=TwoWay}"/> |
|
|
|
</StackPanel> |
|
|
|
</StackPanel> |
|
|
|
</StackPanel> |
|
|
|
<Border Grid.Row="1" |
|
|
|
Grid.Column="0" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="0,0,1,0" |
|
|
|
Padding="10,8"> |
|
|
|
<TextBlock Text="右侧数量" |
|
|
|
FontSize="12" |
|
|
|
Foreground="{StaticResource TextSecondary}"/> |
|
|
|
</Border> |
|
|
|
<Border Grid.Row="1" |
|
|
|
Grid.Column="1" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="1,0,0,0" |
|
|
|
Padding="10,4"> |
|
|
|
<ComboBox ItemsSource="{Binding ConnectorCountOptions}" |
|
|
|
SelectedItem="{Binding SelectedRightConnectorCount, Mode=TwoWay}"/> |
|
|
|
</Border> |
|
|
|
</Grid> |
|
|
|
</Border> |
|
|
|
|
|
|
|
<Grid ColumnDefinitions="*,*" |
|
|
|
ColumnSpacing="16"> |
|
|
|
<StackPanel Grid.Column="0" Spacing="10"> |
|
|
|
<StackPanel Spacing="16"> |
|
|
|
<Expander HorizontalAlignment="Stretch" |
|
|
|
IsExpanded="True" |
|
|
|
Padding="0"> |
|
|
|
<Expander.Header> |
|
|
|
<TextBlock Text="左侧圆" |
|
|
|
FontSize="12" |
|
|
|
FontWeight="SemiBold" |
|
|
|
Foreground="{StaticResource TextPrimary}"/> |
|
|
|
</Expander.Header> |
|
|
|
<Border Background="{StaticResource BackgroundLight}" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="1" |
|
|
|
CornerRadius="6" |
|
|
|
Padding="10"> |
|
|
|
<StackPanel Spacing="10"> |
|
|
|
<TextBlock Text="左侧圆" |
|
|
|
FontSize="12" |
|
|
|
FontWeight="SemiBold" |
|
|
|
Foreground="{StaticResource TextPrimary}"/> |
|
|
|
<ItemsControl ItemsSource="{Binding SelectedNode.ConnectionPoints, Converter={StaticResource ConnectionPointsToInputsConverter}}"> |
|
|
|
<ItemsControl.ItemsPanel> |
|
|
|
<ItemsPanelTemplate> |
|
|
|
<StackPanel Spacing="10"/> |
|
|
|
</ItemsPanelTemplate> |
|
|
|
</ItemsControl.ItemsPanel> |
|
|
|
<ItemsControl.ItemTemplate> |
|
|
|
<DataTemplate> |
|
|
|
<Border Background="{StaticResource BackgroundWhite}" |
|
|
|
Padding="6"> |
|
|
|
<ItemsControl ItemsSource="{Binding SelectedNode.ConnectionPoints, Converter={StaticResource ConnectionPointsToInputsConverter}}" |
|
|
|
HorizontalAlignment="Stretch"> |
|
|
|
<ItemsControl.ItemsPanel> |
|
|
|
<ItemsPanelTemplate> |
|
|
|
<StackPanel Orientation="Vertical" |
|
|
|
Spacing="0"/> |
|
|
|
</ItemsPanelTemplate> |
|
|
|
</ItemsControl.ItemsPanel> |
|
|
|
<ItemsControl.ItemTemplate> |
|
|
|
<DataTemplate> |
|
|
|
<Border Background="{StaticResource BackgroundWhite}" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="1" |
|
|
|
CornerRadius="6" |
|
|
|
HorizontalAlignment="Stretch"> |
|
|
|
<Grid ColumnDefinitions="110,*" |
|
|
|
RowDefinitions="Auto,Auto,Auto,Auto"> |
|
|
|
<Border Grid.Row="0" |
|
|
|
Grid.ColumnSpan="2" |
|
|
|
Background="{StaticResource BackgroundLight}" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="1" |
|
|
|
CornerRadius="6" |
|
|
|
Padding="10"> |
|
|
|
<StackPanel Spacing="10"> |
|
|
|
<TextBlock Text="{Binding Index, Converter={StaticResource IndexToDisplayTextConverter}}" |
|
|
|
FontSize="12" |
|
|
|
FontWeight="SemiBold" |
|
|
|
Foreground="{StaticResource TextPrimary}"/> |
|
|
|
BorderThickness="0,0,0,1" |
|
|
|
Padding="12,6"> |
|
|
|
<TextBlock Text="{Binding Index, Converter={StaticResource IndexToDisplayTextConverter}}" |
|
|
|
FontSize="12" |
|
|
|
FontWeight="SemiBold" |
|
|
|
Foreground="{StaticResource TextPrimary}"/> |
|
|
|
</Border> |
|
|
|
|
|
|
|
<StackPanel Spacing="4"> |
|
|
|
<TextBlock Text="直径" |
|
|
|
FontSize="12" |
|
|
|
Foreground="{StaticResource TextSecondary}"/> |
|
|
|
<TextBox Text="{Binding Diameter, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource DoubleToStringConverter}}" |
|
|
|
Watermark="0"/> |
|
|
|
</StackPanel> |
|
|
|
<Border Grid.Row="1" |
|
|
|
Grid.Column="0" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="0,0,1,1" |
|
|
|
Padding="10,8"> |
|
|
|
<TextBlock Text="直径" |
|
|
|
FontSize="12" |
|
|
|
Foreground="{StaticResource TextSecondary}"/> |
|
|
|
</Border> |
|
|
|
<Border Grid.Row="1" |
|
|
|
Grid.Column="1" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="1,0,0,1" |
|
|
|
Padding="10,4"> |
|
|
|
<TextBox Text="{Binding Diameter, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource DoubleToStringConverter}}" |
|
|
|
Watermark="0"/> |
|
|
|
</Border> |
|
|
|
|
|
|
|
<StackPanel Spacing="4"> |
|
|
|
<TextBlock Text="颜色" |
|
|
|
FontSize="12" |
|
|
|
Foreground="{StaticResource TextSecondary}"/> |
|
|
|
<TextBox Text="{Binding Color, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
|
|
|
Watermark="#RRGGBB"/> |
|
|
|
</StackPanel> |
|
|
|
<Border Grid.Row="2" |
|
|
|
Grid.Column="0" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="0,0,1,1" |
|
|
|
Padding="10,8"> |
|
|
|
<TextBlock Text="颜色" |
|
|
|
FontSize="12" |
|
|
|
Foreground="{StaticResource TextSecondary}"/> |
|
|
|
</Border> |
|
|
|
<Border Grid.Row="2" |
|
|
|
Grid.Column="1" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="1,0,0,1" |
|
|
|
Padding="10,4"> |
|
|
|
<cp:ColorPicker Color="{Binding Color, Mode=TwoWay, Converter={StaticResource ColorHexToColorConverter}}" |
|
|
|
IsAlphaEnabled="False" |
|
|
|
IsColorPreviewVisible="True" |
|
|
|
IsColorPaletteVisible="True"/> |
|
|
|
</Border> |
|
|
|
|
|
|
|
<StackPanel Spacing="4"> |
|
|
|
<TextBlock Text="定位" |
|
|
|
FontSize="12" |
|
|
|
Foreground="{StaticResource TextSecondary}"/> |
|
|
|
<ComboBox SelectedItem="{Binding Placement, Mode=TwoWay}"> |
|
|
|
<ComboBox.ItemTemplate> |
|
|
|
<DataTemplate> |
|
|
|
<TextBlock Text="{Binding Converter={StaticResource ConnectorPlacementToTextConverter}}"/> |
|
|
|
</DataTemplate> |
|
|
|
</ComboBox.ItemTemplate> |
|
|
|
<ComboBox.Items> |
|
|
|
<entities:ConnectorPlacementMode>Inside</entities:ConnectorPlacementMode> |
|
|
|
<entities:ConnectorPlacementMode>Outside</entities:ConnectorPlacementMode> |
|
|
|
</ComboBox.Items> |
|
|
|
</ComboBox> |
|
|
|
</StackPanel> |
|
|
|
</StackPanel> |
|
|
|
<Border Grid.Row="3" |
|
|
|
Grid.Column="0" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="0,0,1,0" |
|
|
|
Padding="10,8"> |
|
|
|
<TextBlock Text="定位" |
|
|
|
FontSize="12" |
|
|
|
Foreground="{StaticResource TextSecondary}"/> |
|
|
|
</Border> |
|
|
|
</DataTemplate> |
|
|
|
</ItemsControl.ItemTemplate> |
|
|
|
</ItemsControl> |
|
|
|
</StackPanel> |
|
|
|
<Border Grid.Row="3" |
|
|
|
Grid.Column="1" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="1,0,0,0" |
|
|
|
Padding="10,4"> |
|
|
|
<ComboBox SelectedItem="{Binding Placement, Mode=TwoWay}"> |
|
|
|
<ComboBox.ItemTemplate> |
|
|
|
<DataTemplate> |
|
|
|
<TextBlock Text="{Binding Converter={StaticResource ConnectorPlacementToTextConverter}}"/> |
|
|
|
</DataTemplate> |
|
|
|
</ComboBox.ItemTemplate> |
|
|
|
<ComboBox.Items> |
|
|
|
<entities:ConnectorPlacementMode>Inside</entities:ConnectorPlacementMode> |
|
|
|
<entities:ConnectorPlacementMode>Outside</entities:ConnectorPlacementMode> |
|
|
|
</ComboBox.Items> |
|
|
|
</ComboBox> |
|
|
|
</Border> |
|
|
|
</Grid> |
|
|
|
</Border> |
|
|
|
</DataTemplate> |
|
|
|
</ItemsControl.ItemTemplate> |
|
|
|
</ItemsControl> |
|
|
|
</Border> |
|
|
|
</StackPanel> |
|
|
|
</Expander> |
|
|
|
|
|
|
|
<StackPanel Grid.Column="1" Spacing="10"> |
|
|
|
<Expander HorizontalAlignment="Stretch" |
|
|
|
IsExpanded="True" |
|
|
|
Padding="0"> |
|
|
|
<Expander.Header> |
|
|
|
<TextBlock Text="右侧圆" |
|
|
|
FontSize="12" |
|
|
|
FontWeight="SemiBold" |
|
|
|
Foreground="{StaticResource TextPrimary}"/> |
|
|
|
</Expander.Header> |
|
|
|
<Border Background="{StaticResource BackgroundLight}" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="1" |
|
|
|
CornerRadius="6" |
|
|
|
Padding="10"> |
|
|
|
<StackPanel Spacing="10"> |
|
|
|
<TextBlock Text="右侧圆" |
|
|
|
FontSize="12" |
|
|
|
FontWeight="SemiBold" |
|
|
|
Foreground="{StaticResource TextPrimary}"/> |
|
|
|
<ItemsControl ItemsSource="{Binding SelectedNode.ConnectionPoints, Converter={StaticResource ConnectionPointsToOutputsConverter}}"> |
|
|
|
<ItemsControl.ItemsPanel> |
|
|
|
<ItemsPanelTemplate> |
|
|
|
<StackPanel Spacing="10"/> |
|
|
|
</ItemsPanelTemplate> |
|
|
|
</ItemsControl.ItemsPanel> |
|
|
|
<ItemsControl.ItemTemplate> |
|
|
|
<DataTemplate> |
|
|
|
<Border Background="{StaticResource BackgroundWhite}" |
|
|
|
Padding="6"> |
|
|
|
<ItemsControl ItemsSource="{Binding SelectedNode.ConnectionPoints, Converter={StaticResource ConnectionPointsToOutputsConverter}}" |
|
|
|
HorizontalAlignment="Stretch"> |
|
|
|
<ItemsControl.ItemsPanel> |
|
|
|
<ItemsPanelTemplate> |
|
|
|
<StackPanel Orientation="Vertical" |
|
|
|
Spacing="0"/> |
|
|
|
</ItemsPanelTemplate> |
|
|
|
</ItemsControl.ItemsPanel> |
|
|
|
<ItemsControl.ItemTemplate> |
|
|
|
<DataTemplate> |
|
|
|
<Border Background="{StaticResource BackgroundWhite}" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="1" |
|
|
|
CornerRadius="6" |
|
|
|
HorizontalAlignment="Stretch"> |
|
|
|
<Grid ColumnDefinitions="110,*" |
|
|
|
RowDefinitions="Auto,Auto,Auto,Auto"> |
|
|
|
<Border Grid.Row="0" |
|
|
|
Grid.ColumnSpan="2" |
|
|
|
Background="{StaticResource BackgroundLight}" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="1" |
|
|
|
CornerRadius="6" |
|
|
|
Padding="10"> |
|
|
|
<StackPanel Spacing="10"> |
|
|
|
<TextBlock Text="{Binding Index, Converter={StaticResource IndexToDisplayTextConverter}}" |
|
|
|
FontSize="12" |
|
|
|
FontWeight="SemiBold" |
|
|
|
Foreground="{StaticResource TextPrimary}"/> |
|
|
|
BorderThickness="0,0,0,1" |
|
|
|
Padding="12,6"> |
|
|
|
<TextBlock Text="{Binding Index, Converter={StaticResource IndexToDisplayTextConverter}}" |
|
|
|
FontSize="12" |
|
|
|
FontWeight="SemiBold" |
|
|
|
Foreground="{StaticResource TextPrimary}"/> |
|
|
|
</Border> |
|
|
|
|
|
|
|
<StackPanel Spacing="4"> |
|
|
|
<TextBlock Text="直径" |
|
|
|
FontSize="12" |
|
|
|
Foreground="{StaticResource TextSecondary}"/> |
|
|
|
<TextBox Text="{Binding Diameter, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource DoubleToStringConverter}}" |
|
|
|
Watermark="0"/> |
|
|
|
</StackPanel> |
|
|
|
<Border Grid.Row="1" |
|
|
|
Grid.Column="0" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="0,0,1,1" |
|
|
|
Padding="10,8"> |
|
|
|
<TextBlock Text="直径" |
|
|
|
FontSize="12" |
|
|
|
Foreground="{StaticResource TextSecondary}"/> |
|
|
|
</Border> |
|
|
|
<Border Grid.Row="1" |
|
|
|
Grid.Column="1" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="1,0,0,1" |
|
|
|
Padding="10,4"> |
|
|
|
<TextBox Text="{Binding Diameter, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource DoubleToStringConverter}}" |
|
|
|
Watermark="0"/> |
|
|
|
</Border> |
|
|
|
|
|
|
|
<StackPanel Spacing="4"> |
|
|
|
<TextBlock Text="颜色" |
|
|
|
FontSize="12" |
|
|
|
Foreground="{StaticResource TextSecondary}"/> |
|
|
|
<TextBox Text="{Binding Color, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
|
|
|
Watermark="#RRGGBB"/> |
|
|
|
</StackPanel> |
|
|
|
<Border Grid.Row="2" |
|
|
|
Grid.Column="0" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="0,0,1,1" |
|
|
|
Padding="10,8"> |
|
|
|
<TextBlock Text="颜色" |
|
|
|
FontSize="12" |
|
|
|
Foreground="{StaticResource TextSecondary}"/> |
|
|
|
</Border> |
|
|
|
<Border Grid.Row="2" |
|
|
|
Grid.Column="1" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="1,0,0,1" |
|
|
|
Padding="10,4"> |
|
|
|
<cp:ColorPicker Color="{Binding Color, Mode=TwoWay, Converter={StaticResource ColorHexToColorConverter}}" |
|
|
|
IsAlphaEnabled="False" |
|
|
|
IsColorPreviewVisible="True" |
|
|
|
IsColorPaletteVisible="True"/> |
|
|
|
</Border> |
|
|
|
|
|
|
|
<StackPanel Spacing="4"> |
|
|
|
<TextBlock Text="定位" |
|
|
|
FontSize="12" |
|
|
|
Foreground="{StaticResource TextSecondary}"/> |
|
|
|
<ComboBox SelectedItem="{Binding Placement, Mode=TwoWay}"> |
|
|
|
<ComboBox.ItemTemplate> |
|
|
|
<DataTemplate> |
|
|
|
<TextBlock Text="{Binding Converter={StaticResource ConnectorPlacementToTextConverter}}"/> |
|
|
|
</DataTemplate> |
|
|
|
</ComboBox.ItemTemplate> |
|
|
|
<ComboBox.Items> |
|
|
|
<entities:ConnectorPlacementMode>Inside</entities:ConnectorPlacementMode> |
|
|
|
<entities:ConnectorPlacementMode>Outside</entities:ConnectorPlacementMode> |
|
|
|
</ComboBox.Items> |
|
|
|
</ComboBox> |
|
|
|
</StackPanel> |
|
|
|
</StackPanel> |
|
|
|
<Border Grid.Row="3" |
|
|
|
Grid.Column="0" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="0,0,1,0" |
|
|
|
Padding="10,8"> |
|
|
|
<TextBlock Text="定位" |
|
|
|
FontSize="12" |
|
|
|
Foreground="{StaticResource TextSecondary}"/> |
|
|
|
</Border> |
|
|
|
</DataTemplate> |
|
|
|
</ItemsControl.ItemTemplate> |
|
|
|
</ItemsControl> |
|
|
|
</StackPanel> |
|
|
|
<Border Grid.Row="3" |
|
|
|
Grid.Column="1" |
|
|
|
BorderBrush="{StaticResource BorderLight}" |
|
|
|
BorderThickness="1,0,0,0" |
|
|
|
Padding="10,4"> |
|
|
|
<ComboBox SelectedItem="{Binding Placement, Mode=TwoWay}"> |
|
|
|
<ComboBox.ItemTemplate> |
|
|
|
<DataTemplate> |
|
|
|
<TextBlock Text="{Binding Converter={StaticResource ConnectorPlacementToTextConverter}}"/> |
|
|
|
</DataTemplate> |
|
|
|
</ComboBox.ItemTemplate> |
|
|
|
<ComboBox.Items> |
|
|
|
<entities:ConnectorPlacementMode>Inside</entities:ConnectorPlacementMode> |
|
|
|
<entities:ConnectorPlacementMode>Outside</entities:ConnectorPlacementMode> |
|
|
|
</ComboBox.Items> |
|
|
|
</ComboBox> |
|
|
|
</Border> |
|
|
|
</Grid> |
|
|
|
</Border> |
|
|
|
</DataTemplate> |
|
|
|
</ItemsControl.ItemTemplate> |
|
|
|
</ItemsControl> |
|
|
|
</Border> |
|
|
|
</StackPanel> |
|
|
|
</Grid> |
|
|
|
</Expander> |
|
|
|
</StackPanel> |
|
|
|
</StackPanel> |
|
|
|
</Border> |
|
|
|
</StackPanel> |
|
|
|
|