We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

When adding node to diagram using mouse double click event, the node cannot be selected on the diagram

Thread ID:

Created:

Updated:

Platform:

Replies:

118736 Apr 6,2015 12:00 PM UTC Apr 9,2015 12:59 PM UTC WPF 2
loading
Tags: Diagram
Harshada Modak
Asked On April 6, 2015 12:00 PM UTC

I am using drag and drop event to add nodes from SymbolPalette.
I would also like to support mouse double click or other hot keys for adding nodes on the diagram.

I have added event to handle double click event and in this event the node is added to the diagram. Following is the code snippet for the same.
        private void listView_PreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var selectedPalette = ((System.Windows.Controls.Primitives.Selector)(sender)).SelectedItem as SymbolPaletteItem;
            if (selectedPalette != null)
            {
                var node1 = selectedPalette.Content as Node;
                if (node1 != null)
                {
                    var node = Nodes.Nodes.GetNode(node1.Name);
                    DiagramView.Model.Nodes.Add(node);                   
                }
            }
        }

Now my node is added to collection of nodes in the diagram control model. But I cannot see the ports associated with this node, nor I can select it using single click.

Am I missing on any of the steps while adding the node to diagram control.

Ranjitha Amirthalingam [Syncfusion]
Replied On April 7, 2015 01:17 PM UTC

Hi Harshada,

Thanks for using Syncfusion Products.

We are working on your requirement “Unable to select the Node using Single click and Port is not visible for the Node”. We will update the status of your requirement on Tomorrow 8th April, 2015.

Please let us know if you require further assistance on this,

Regards,

Ranjitha A.



Ranjitha Amirthalingam [Syncfusion]
Replied On April 9, 2015 12:59 PM UTC

Hi Harshada,

We could see that you have created an incident for this issue, please follow up with the incident for further assistance on this.

Requirement: Selecting the Node using Single click and Ports need to be visible for the Node

We have analyzed your requirement. We have created simple sample to achieve your requirement. Please refer to the sample from the following link

Sample Link:
Symbolpalette_listview.zip

Please let us know if you require further assistance on this

Regards,           

Ranjitha A



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;