Drag and Drop in Rad Diagram

2 posts, 0 answers
  1. Swati
    Swati avatar
    17 posts
    Member since:
    Jan 2012

    Posted 07 Aug 2012 Link to this post

    Hi,

    Can we create our own controls like Rectangle, Ellipse and add them to the Rad Diagram for performing all the functionality which are supported by Rad Diagram?

    Please send us example. I need to add Rectangle to the Rad Diagram and need to change its color, size... How to do that???

    To dynamically get control I used below code:
    RadDiagramShape shape=new RadDiagramShape();
                shape.Geometry= ShapeFactory.GetShapeGeometry(CommonShapeType.RectangleShape);
                raddiag.AddShape(shape);

    foreach
     (RadDiagramShape sample in raddiag.Items)
                    {
                    sample.Background  = newBrush;
                    }


    And used the foreach loop to get the control and apply color... but  we are not able to get any item in raddiag.Items it is showing null.. what we are missing here???? please let us know...

    Keenly waiting for reply...

    Regards,
    Swati 
  2. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 07 Aug 2012 Link to this post

    Hello Swati,

    I posted a reply to your previous thread here. However, if your scenario is related to a drag/drop operation and the suggested approaches don't work for you, we'd appreciate it if you modify the solution I created to better illustrate your case.

    All the best,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top