private void OnIsPinnedChanged() { if (IsPinned) { #if TRACE_DETAILS Debug.WriteLine("ToolTip just got pinned"); #endif if (_adornerDragDrop is null && _adorner != null) { _adornerDragDrop = ControlAdornerDragDrop.Attach(_adorner, _dragGrip); } StopTimer(); } else { #if TRACE_DETAILS Debug.WriteLine("ToolTip just got unpinned"); #endif if (_adornerDragDrop != null) { ControlAdornerDragDrop.Detach(_adornerDragDrop); _adornerDragDrop = null; } Hide(); } IsPinnedChanged?.Invoke(this, EventArgs.Empty); }
private void OnIsPinnedChanged() { if (IsPinned) { if (_adornerDragDrop == null && _adorner != null) { _adornerDragDrop = ControlAdornerDragDrop.Attach(_adorner, _dragGrip); } StopTimer(); } else { if (_adornerDragDrop != null) { ControlAdornerDragDrop.Detach(_adornerDragDrop); _adornerDragDrop = null; } Hide(); } IsPinnedChanged.SafeInvoke(this); }