I need a RadDiagramContainerShape that has not use auto-sizing capabilities, I would afterthat I add several RectangleShapes into RadDiagramContainerShape, I can't move any RectangleShape outside to RadDiagramContainerShape .
You can manually control your RadContainerShapes by overriding the CalculateShapeBounds function of your container. This will allow you to set the size of the container and prevent it from being changed based on the children added.
If you are using a layout with your diagram, you will also want to change the LayoutContainerChildren property to prevent the layout algorithm from changing the position of the container children.
Shawn
0
Petar Mladenov
Telerik team
answered on 15 May 2017, 10:15 AM
Hello Dario ,
In addition to Shawn's answer I will propose a solution to prevent dragging shapes from their parent container. You can use the PreviewDrag event of RadDiagram:
foreach (RadDiagramShapeBase shape in e.Items.OfType<RadDiagramShapeBase>())
{
if (shape.ParentContainer != null)
{
e.Handled = true;
return;
}
}
}
Regards,
Petar Mladenov
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.