File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- using System ;
1+ using System ;
22using System . Windows ;
33using System . Windows . Controls ;
44using System . Windows . Controls . Primitives ;
@@ -344,6 +344,38 @@ public Side AttachmentSide
344344 get { return ( ( Side ) GetValue ( AttachmentSideProperty ) ) ; }
345345 set { SetValue ( AttachmentSideProperty , value ) ; }
346346 }
347+
348+ private UIElement _target ;
349+
350+ protected override void OnOpened ( RoutedEventArgs e )
351+ {
352+ base . OnOpened ( e ) ;
353+
354+ _target = PlacementTarget ;
355+ if ( _target != null )
356+ {
357+ _target . IsVisibleChanged += Target_IsVisibleChanged ;
358+ }
359+ }
360+
361+ protected override void OnClosed ( RoutedEventArgs e )
362+ {
363+ base . OnClosed ( e ) ;
364+
365+ if ( _target != null )
366+ {
367+ _target . IsVisibleChanged -= Target_IsVisibleChanged ;
368+ _target = null ;
369+ }
370+ }
371+
372+ private void Target_IsVisibleChanged ( object sender , DependencyPropertyChangedEventArgs e )
373+ {
374+ if ( _target != null && ! _target . IsVisible )
375+ {
376+ IsOpen = false ;
377+ }
378+ }
347379 }
348380
349381 public class LibraryToolTipPopup : Popup
Original file line number Diff line number Diff line change @@ -4309,6 +4309,8 @@ override Dynamo.UI.Controls.CodeBlockEditor.OnCommitChange() -> void
43094309override Dynamo.UI.Controls.CodeBlockEditor.OnEscape() -> void
43104310override Dynamo.UI.Controls.CodeBlockEditor.OnTextAreaGotFocus(object sender, System.Windows.RoutedEventArgs e) -> void
43114311override Dynamo.UI.Controls.CodeCompletionEditor.OnPreviewKeyDown(System.Windows.Input.KeyEventArgs e) -> void
4312+ override Dynamo.UI.Controls.DynamoToolTip.OnClosed(System.Windows.RoutedEventArgs e) -> void
4313+ override Dynamo.UI.Controls.DynamoToolTip.OnOpened(System.Windows.RoutedEventArgs e) -> void
43124314override Dynamo.UI.Controls.ImageButton.OnApplyTemplate() -> void
43134315override Dynamo.UI.Controls.ImageCheckBox.OnApplyTemplate() -> void
43144316override Dynamo.UI.Controls.ImageRepeatButton.OnApplyTemplate() -> void
@@ -5925,4 +5927,4 @@ virtual Dynamo.Wpf.ViewModels.Watch3D.DefaultWatch3DViewModel.UpdateHelpers() ->
59255927virtual Dynamo.Wpf.ViewModels.Watch3D.DefaultWatch3DViewModel.ZoomToFit(object parameter) -> void
59265928virtual Dynamo.Wpf.ViewModels.Watch3D.HelixWatch3DViewModel.OnWatchExecution() -> void
59275929virtual Dynamo.Wpf.ViewModels.Watch3D.HelixWatch3DViewModel.UpdateUpstream() -> void
5928- virtual UI.Prompts.PortPropertiesEditPrompt.OnPropertyChanged(System.ComponentModel.PropertyChangedEventArgs e) -> void
5930+ virtual UI.Prompts.PortPropertiesEditPrompt.OnPropertyChanged(System.ComponentModel.PropertyChangedEventArgs e) -> void
You can’t perform that action at this time.
0 commit comments