Hi,
Lokking for a way to drag a shape with hollow figure.
I want to know if it is possible to redefine the drag area(center) in RadDiagramShape with a container like function.
As a sample below, Want to drag an empty area(circle center) to the hollow circle
private void InitializeShapeModels()
{
this.ShapeModels = new ObservableCollection<ShapeGalleryItemViewModel>();
this.ShapeModels.Add(new ShapeGalleryItemViewModel(){ CustomGeometry = ShapeFactory.CommonGeometries[CommonShapeType.EllipseShape]});
GeometryGroup ellipses = new GeometryGroup();
ellipses.Children.Add( new EllipseGeometry(new Point(50, 50), 50, 50));
ellipses.Children.Add( new EllipseGeometry(new Point(50, 50), 45, 45));
Geometry emptyellipses = PathGeometry.CreateFromGeometry(ellipses);
this.ShapeModels.Add(new ShapeGalleryItemViewModel() { CustomGeometry = emptyellipses });
}
When selected objects, like shapes and links between the shapes are dragged, if they are selected they all move together as a group as expected. At the end of the drag, a Drag event is generated and in the DragRoutedEventArgs there's an Items list which indicates which items have been dragged, and in some cases the new position.
If the item being dragged is a shape, then I see a IDragItem with a position value.
If the items is a connection between say two shapes dragged, then I see another IDragItem, however, it's position is always 0, 0
The problem I have is that if the connection is a straight line between shapes then it works fine. However, if the connection has extra points added by the user, then I don't get told about those points. So how do I update the data behind about those points?
Dragging the shapes in the view is working correctly, however there's missing data, so if I save and restore, the extra connection points weren't updated so they show the old position. I'll attach a diagram of what I mean.