|
98 | 98 | <Setter Property="Opacity" |
99 | 99 | Value="1" /> |
100 | 100 | </Trigger> |
101 | | - <Trigger Property="IsMouseDirectlyOver" |
102 | | - Value="False"> |
103 | | - <Setter Property="OutlineBrush" |
104 | | - Value="Transparent" /> |
| 101 | + <Trigger Property="IsSelectable" |
| 102 | + Value="True"> |
| 103 | + <Setter Property="Cursor" |
| 104 | + Value="Hand" /> |
105 | 105 | </Trigger> |
| 106 | + <MultiTrigger> |
| 107 | + <MultiTrigger.Conditions> |
| 108 | + <Condition Property="IsMouseDirectlyOver" |
| 109 | + Value="False" /> |
| 110 | + <Condition Property="IsSelected" |
| 111 | + Value="False" /> |
| 112 | + </MultiTrigger.Conditions> |
| 113 | + <MultiTrigger.Setters> |
| 114 | + <Setter Property="OutlineBrush" |
| 115 | + Value="Transparent" /> |
| 116 | + </MultiTrigger.Setters> |
| 117 | + </MultiTrigger> |
106 | 118 | </Style.Triggers> |
107 | 119 | <Setter Property="Opacity" Value="{Binding Source={StaticResource ConnectionAnimationPlaceholder}, Path=Opacity}" /> |
108 | 120 | <Setter Property="Stroke" Value="{DynamicResource Connection.StrokeBrush}"/> |
|
113 | 125 | Opacity="0.15" /> |
114 | 126 | </Setter.Value> |
115 | 127 | </Setter> |
116 | | - <Setter Property="Cursor" Value="Hand"/> |
117 | 128 | <Setter Property="ToolTip" Value="Double click to split"/> |
118 | 129 | <Setter Property="Source" Value="{Binding Output.Anchor}" /> |
119 | 130 | <Setter Property="Target" Value="{Binding Input.Anchor}" /> |
|
135 | 146 | <Setter Property="IsAnimatingDirectionalArrows" Value="{Binding IsAnimatingConnections, Source={x:Static local:EditorSettings.Instance}}" /> |
136 | 147 | <Setter Property="DirectionalArrowsAnimationDuration" Value="{Binding DirectionalArrowsAnimationDuration, Source={x:Static local:EditorSettings.Instance}}" /> |
137 | 148 | <Setter Property="Text" Value="{Binding ConnectionText, Source={x:Static local:EditorSettings.Instance}}" /> |
| 149 | + <Setter Property="IsSelectable" |
| 150 | + Value="{Binding SelectableConnections, Source={x:Static local:EditorSettings.Instance}}" /> |
| 151 | + <Setter Property="IsSelected" |
| 152 | + Value="{Binding IsSelected}" /> |
138 | 153 | </Style> |
139 | 154 |
|
140 | 155 | <DataTemplate x:Key="CircuitConnectionTemplate"> |
|
213 | 228 | <Grid> |
214 | 229 | <nodify:NodifyEditor x:Name="Editor" |
215 | 230 | ItemsSource="{Binding Nodes}" |
| 231 | + SelectedItems="{Binding SelectedNodes}" |
| 232 | + CanSelectMultipleItems="{Binding CanSelectMultipleNodes, Source={x:Static local:EditorSettings.Instance}}" |
216 | 233 | Connections="{Binding Connections}" |
| 234 | + SelectedConnection="{Binding SelectedConnection}" |
| 235 | + SelectedConnections="{Binding SelectedConnections}" |
| 236 | + CanSelectMultipleConnections="{Binding CanSelectMultipleConnections, Source={x:Static local:EditorSettings.Instance}}" |
217 | 237 | PendingConnection="{Binding PendingConnection}" |
218 | | - SelectedItems="{Binding SelectedNodes}" |
219 | 238 | DisconnectConnectorCommand="{Binding DisconnectConnectorCommand}" |
220 | 239 | ViewportLocation="{Binding Location.Value, Source={x:Static local:EditorSettings.Instance}}" |
221 | 240 | ViewportSize="{Binding ViewportSize, Mode=OneWayToSource}" |
|
547 | 566 | </Style> |
548 | 567 | </nodify:Minimap.ItemContainerStyle> |
549 | 568 | </nodify:Minimap> |
| 569 | + |
| 570 | + <Border Width="250" |
| 571 | + MaxHeight="300" |
| 572 | + Margin="0 50" |
| 573 | + CornerRadius="3" |
| 574 | + HorizontalAlignment="Right" |
| 575 | + VerticalAlignment="Top" |
| 576 | + Visibility="{Binding SelectedConnection, Converter={shared:BooleanToVisibilityConverter}}" |
| 577 | + Background="{DynamicResource PanelBackgroundBrush}"> |
| 578 | + <StackPanel Margin="10"> |
| 579 | + <StackPanel.Resources> |
| 580 | + <Style TargetType="{x:Type TextBlock}" |
| 581 | + BasedOn="{StaticResource {x:Type TextBlock}}"> |
| 582 | + <Setter Property="Margin" |
| 583 | + Value="0 0 0 5" /> |
| 584 | + </Style> |
| 585 | + </StackPanel.Resources> |
| 586 | + |
| 587 | + <StackPanel Margin="0 0 0 14"> |
| 588 | + <TextBlock Text="Selected connection" |
| 589 | + Foreground="{DynamicResource Node.ForegroundBrush}" |
| 590 | + FontWeight="Bold" /> |
| 591 | + </StackPanel> |
| 592 | + |
| 593 | + <TextBlock TextWrapping="Wrap" |
| 594 | + Margin="0 0 0 14" |
| 595 | + Foreground="{DynamicResource Node.ForegroundBrush}"> |
| 596 | + <Run>From</Run> |
| 597 | + <Run Text="{Binding SelectedConnection.Output.Node.Title}" |
| 598 | + Foreground="Red" /> |
| 599 | + <Run> - </Run> |
| 600 | + <Run Text="{Binding SelectedConnection.Output.Title}" |
| 601 | + Foreground="Red" /> |
| 602 | + <Run>to</Run> |
| 603 | + <Run Text="{Binding SelectedConnection.Input.Node.Title}" |
| 604 | + Foreground="Red" /> |
| 605 | + <Run> - </Run> |
| 606 | + <Run Text="{Binding SelectedConnection.Input.Title}" |
| 607 | + Foreground="Red" /> |
| 608 | + </TextBlock> |
| 609 | + |
| 610 | + <Button Command="{Binding SelectedConnection.DisconnectCommand}" |
| 611 | + HorizontalAlignment="Left" |
| 612 | + Style="{StaticResource HollowButton}" |
| 613 | + Content="Delete" /> |
| 614 | + </StackPanel> |
| 615 | + </Border> |
550 | 616 | </Grid> |
551 | 617 |
|
552 | 618 | </UserControl> |
0 commit comments