lundi 29 juin 2015

How to define Droppable Area in WPF?

I'm writing an application that consists of diagram and symbol palette. Symbol palette contains elements that can be placed in the diagram. Elements of diagram can be connected to each other with straight line, orthogonal line, Bezier curves,... . Applications should allow user insert a new element from symbol palette between two existing linked elements using the Drag & Drop. I would like to highlight drop target, for example by color change.

The problem is that the lines are very thin and DragOver event raises in very small area. I need to enlarge Droppable area around the lines which raises DragOver event. The line is inherited from the type System.Windows.Controls.ContentControl.

Aucun commentaire:

Enregistrer un commentaire