This is a migrated thread and some comments may be shown as answers.

Gridline Height & Width

2 Answers 91 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rick Mueller
Top achievements
Rank 1
Rick Mueller asked on 18 Apr 2012, 06:11 PM
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 Answers, 1 is accepted

Sort by
0
Miro Miroslavov
Telerik team
answered on 19 Apr 2012, 08:30 AM
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 >>

0
Rick Mueller
Top achievements
Rank 1
answered on 19 Apr 2012, 02:48 PM
Miro

Thank you,

I got it now
Regards,
RIck
Tags
Diagram
Asked by
Rick Mueller
Top achievements
Rank 1
Answers by
Miro Miroslavov
Telerik team
Rick Mueller
Top achievements
Rank 1
Share this question
or