RadDiagram Round Container & Overlap

5 posts, 1 answers
  1. Joel Palmer
    Joel Palmer avatar
    164 posts
    Member since:
    May 2009

    Posted 20 May 2014 Link to this post

    I want to start from your example labeled "Diagram Toolbox".  This examples has a lot of circles.  However, your containers are square.  Can you give me an example of a container that is styled as round?

    Also, I need to model circles that over-lap.  Do you have a way to show the part that is overlapping as a different color and I could put some text explaining the over-lap?  For example, if I have Family1 and Family2 and I need to model how Family3 has people from both groups because of a marriage between F1 and F2, I would have 3 circles that have overlap.
  2. Joel Palmer
    Joel Palmer avatar
    164 posts
    Member since:
    May 2009

    Posted 21 May 2014 in reply to Joel Palmer Link to this post

    Ignore the 2nd paragraph.  From my learning, it seems that request is out of bounds. 

    However, I would still like to have an example on how to make a container a circle instead of its default square.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Joel Palmer
    Joel Palmer avatar
    164 posts
    Member since:
    May 2009

    Posted 21 May 2014 Link to this post

    Also, is there a way I can perform a Layout command against a Container?  There are a lot of examples on how to do this against a RadDiagram, but what if I have a list of items in a Container that needs to be formatted?
    TreeLayoutSettings settings = new TreeLayoutSettings()
    {
        TreeLayoutType = TreeLayoutType.RadialTree,
        VerticalDistance = 20,
    };
    var layout = new TreeLayout();
     
    foreach (var item in this.diagram.Items)
    {
        if (item is IContainerShape)
        {
            settings.Roots.Add(item as IContainerShape);
        }
    }
     
    layout.Layout(this.diagram, settings);
    this.diagram.AutoFit();
    var main = diagram.CreateContainerShape("Main");
    var group1 = diagram.CreateContainerShape("Group1");
    var group2 = diagram.CreateContainerShape("Group 2");
    group2.AddItems(lst.ToArray());
    main.AddItems(new[] { group1, group2 });
    ontrol? 
  5. Answer
    Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 23 May 2014 Link to this post

    Hi,

    Unfortunately, there is not an easy way to change the shape of the RadDiagramContainerShape objects. They are designed to be rectangular and we do not suggest changing such core functionality.

    Furthermore, the RadDiagram framework exposes the Layout feature. This means that the RadDiagram is capable of arranging its items. The RadDiagramContainerShapes are actually shapes which can also be arranged by the diagramming framework. Unfortunately, they do not expose the same Layout functionality. This is why there is no way to trigger that feature in the context of the RadDiagramContainerShape.

    Regards,
    Pavel R. Pavlov
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
     
  6. Joel Palmer
    Joel Palmer avatar
    164 posts
    Member since:
    May 2009

    Posted 27 May 2014 in reply to Pavel R. Pavlov Link to this post

    I found that performing a layout first then adding the shapes to the container subsequently allows me to show them in a layout fashion.  Thanks for your help.
Back to Top
UI for WPF is Visual Studio 2017 Ready