I made a custom shape contains only RadDiagramContainerShape. It's a new control in my gallery.
I drag it from my toolbar and drop it to the diagram.
But when try to drop them inside it, it does not hosting any shape when!
What I have to do?
Thank you.
I drag it from my toolbar and drop it to the diagram.
But when try to drop them inside it, it does not hosting any shape when!
What I have to do?
Thank you.
7 Answers, 1 is accepted
0
Alaa
Top achievements
Rank 1
answered on 17 Feb 2015, 01:36 PM
I need a solution for this!
I think I need to handle manually DragOver & Drop Events for the RadDiagramContainerShape, and this is what I did like the following
private void DiagramItemsChanged(object sender, DiagramItemsChangedEventArgs args)
{
EventManager.RegisterClassHandler(typeof(MyContainer), RadDiagramShape.DragOverEvent, new System.Windows.DragEventHandler(OnDragOver));
EventManager.RegisterClassHandler(typeof(MyContainer), RadDiagramShape.DropEvent, new System.Windows.DragEventHandler(OnDrop));
//.......}
It hits the OnDragOver but didn't hit OnDrop!
I think I need to handle manually DragOver & Drop Events for the RadDiagramContainerShape, and this is what I did like the following
private void DiagramItemsChanged(object sender, DiagramItemsChangedEventArgs args)
{
EventManager.RegisterClassHandler(typeof(MyContainer), RadDiagramShape.DragOverEvent, new System.Windows.DragEventHandler(OnDragOver));
EventManager.RegisterClassHandler(typeof(MyContainer), RadDiagramShape.DropEvent, new System.Windows.DragEventHandler(OnDrop));
//.......}
It hits the OnDragOver but didn't hit OnDrop!
0
Hi Alaa,
I am writing to notify you that we are currently working on this case. We will get back to you as soon as we have more information to share.
Regards,
Pavel R. Pavlov
Telerik
I am writing to notify you that we are currently working on this case. We will get back to you as soon as we have more information to share.
Regards,
Pavel R. Pavlov
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Hello,
It does not become clear what might be causing this issue. You can take a look at our online help topic about Drag and Drop support to help you understand how the drag and drop works.
RadDiagram relies on its Serialization feature when you perform drag and drop operations. This is why I suggest using it instead of implementing custom dropping logic. You can do this by using the ISerializationService.
I demonstrated how this can be achieved in the attached project.
Regards,
Peshito
Telerik
It does not become clear what might be causing this issue. You can take a look at our online help topic about Drag and Drop support to help you understand how the drag and drop works.
RadDiagram relies on its Serialization feature when you perform drag and drop operations. This is why I suggest using it instead of implementing custom dropping logic. You can do this by using the ISerializationService.
I demonstrated how this can be achieved in the attached project.
Regards,
Peshito
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Alaa
Top achievements
Rank 1
answered on 22 Feb 2015, 08:29 AM
@Peshito
I tried this but it didnt work!
I tried this but it didnt work!
0
Alaa
Top achievements
Rank 1
answered on 22 Feb 2015, 08:42 AM
@Pavel R. Pavlov, Please notify me when you find a solution.
Guys, what I need is a container for my custom shapes looks like callout.
What I did now, after my previous attempts didn't work is
I created a class inherits from RadDiagramContainerShape, and created a ResourceDictionary for the template, it contains a path of the callout!
But Now, I got a problem. The connector don't appear even they are serializing in my file.
please, look at the attached image, you won't find any connector!
Guys, what I need is a container for my custom shapes looks like callout.
What I did now, after my previous attempts didn't work is
I created a class inherits from RadDiagramContainerShape, and created a ResourceDictionary for the template, it contains a path of the callout!
But Now, I got a problem. The connector don't appear even they are serializing in my file.
please, look at the attached image, you won't find any connector!
0
0
Hi Alaa,
I am glad you managed to solve the connectors issue. As for the drag and drop problem you are having when custom shapes are used, could you please send us a sample runnable project pointing it out. Without your implementation it is hard to give you a possible solution. As this is a forum thread you should use a third party website for files upload.
Regards,
Peshito
Telerik
I am glad you managed to solve the connectors issue. As for the drag and drop problem you are having when custom shapes are used, could you please send us a sample runnable project pointing it out. Without your implementation it is hard to give you a possible solution. As this is a forum thread you should use a third party website for files upload.
Regards,
Peshito
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.