Gridline Height & Width

3 posts, 0 answers
  1. Rick Mueller
    Rick Mueller avatar
    103 posts
    Member since:
    Feb 2010

    Posted 18 Apr 2012 Link to this post

    Hello,

    Looking at your demos, I can't see the way the h&W are binded to the Diagram.Graphpaper et.c
    private void widthspin_ValueChanged(object sender, RadRangeBaseValueChangedEventArgs e)
           {
               if (DiaGrid != null && widthspin != null && widthspin.Value.HasValue)
                   GraphPaper.SetCellSize(DiaGrid, new Size(widthspin.Value.Value, widthspin.Value.Value));
     
           }
     
           private void htspin_ValueChanged(object sender, RadRangeBaseValueChangedEventArgs e)
           {
               if (DiaGrid != null && htspin != null && htspin.Value.HasValue)
                   GraphPaper.SetCellSize(DiaGrid, new Size(htspin.Value.Value, htspin.Value.Value));
     
           }
    any thought/help

    Thanks
    Rick
    Looking at the code behind I see the Valuechanged Events, but both have the same results.
  2. Miro Miroslavov
    Admin
    Miro Miroslavov avatar
    588 posts

    Posted 19 Apr 2012 Link to this post

    Hi Rick,

     The GraphPaper control that is part of the Diagram style has some Attached properties that you can attach to the RadDiagram which describes how it looks. For Example GraphPaper.LineStroke, CellSize, LineThickness and so on...
    The example code is as follows:

    GraphPaper.SetCellSize(diagram, new Size(CellWidthSpinner.Value.Value, CellHeightSpinner.Value.Value));

    Please let us know if you have further questions. 

    All the best,
    Miro Miroslavov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Rick Mueller
    Rick Mueller avatar
    103 posts
    Member since:
    Feb 2010

    Posted 19 Apr 2012 Link to this post

    Miro

    Thank you,

    I got it now
    Regards,
    RIck
Back to Top