Current filter:
                                You should refresh the page.
                                  • Hi,

                                    I have a question concerning the diagram control:

                                    Is there any way to force a new connection to actually be connected to 2 items? For example, we start to drag a connection from one item; is there a way to enforce that the user drop it onto a second item and ignore the connection creation if the user drops it outside an item?

                                    Thanks for your help,

                                1 Solution

                                Creation Date Importance Sort by

                                Hi Stefan,
                                To prohibit adding connectors without end items, handle the AddingNewItem event and set e.Cancel to true if the BeginItem and EndItem properties are null:

                                private void DiagramDesignerControl_AddingNewItem(object sender, DevExpress.Xpf.Diagram.DiagramAddingNewItemEventArgs e) { DiagramConnector connector = e.Item as DiagramConnector; if (connector != null && (connector.BeginItem == null || connector.EndItem == null)) e.Cancel = true; }