Telerik Forums
UI for WPF Forum
0 answers
10 views
Is the TableShape solution from the Demos application available for download? I've tried using the SDK samples browser and looking in Github repo. I can't find it. Also, does it support Drag and Drop?
Will
Top achievements
Rank 1
Iron
 asked on 23 May 2024
0 answers
54 views

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 });
}

Dooly
Top achievements
Rank 1
Iron
 asked on 02 Mar 2022
1 answer
105 views

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.

Vladimir Stoyanov
Telerik team
 answered on 07 Sep 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Patrick
Top achievements
Rank 1
Iron
Iron
Iron
MIS
Top achievements
Rank 1
Ross
Top achievements
Rank 1
Marcin
Top achievements
Rank 1
Iron
Iron
Sean
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Patrick
Top achievements
Rank 1
Iron
Iron
Iron
MIS
Top achievements
Rank 1
Ross
Top achievements
Rank 1
Marcin
Top achievements
Rank 1
Iron
Iron
Sean
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?