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 }); } } }
/// <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(); }
public void OnDoubleClicked() { NodeDoubleClicked?.Invoke(this, EventArgs.Empty); }