예제 #1
0
        private void nodeRenderer_DoubleClick(object sender, MouseButtonEventArgs e)
        {
            Point newLocation = e.GetPosition(null);

            if (newLocation == _lastPosition)
            {
                if (NodeDoubleClicked != null)
                {
                    NodeDoubleClicked.Invoke(this, new NodeClickedArgs()
                    {
                        Node = Node
                    });
                }
            }
        }
예제 #2
0
        /// <summary>
        /// Handler for label double click.
        /// </summary>
        /// <param name="control">Event source.</param>
        protected virtual void OnDoubleClickName(ControlBase control, EventArgs args)
        {
            if (!m_ToggleButton.IsVisible)
            {
                // Invoke double click events only if node hasn't child nodes.
                // Otherwise toggle expand/collapse.
                if (NodeDoubleClicked != null)
                {
                    NodeDoubleClicked.Invoke(this, EventArgs.Empty);
                }

                if (RootNode != null && RootNode.NodeDoubleClicked != null)
                {
                    RootNode.NodeDoubleClicked.Invoke(this, EventArgs.Empty);
                }

                return;
            }

            m_ToggleButton.Toggle();
        }
예제 #3
0
 public void OnDoubleClicked()
 {
     NodeDoubleClicked?.Invoke(this, EventArgs.Empty);
 }