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

Ruler that displays units in inches/ mm

2 Answers 166 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Rajkumar
Top achievements
Rank 1
Rajkumar asked on 27 May 2014, 09:47 AM
Is there a way to customize the horizontal and vertical ruler to display units in inches or mm ?

2 Answers, 1 is accepted

Sort by
0
Accepted
Milena
Telerik team
answered on 28 May 2014, 10:14 AM
Hello Rajkumar,

The MeasurementUnit  property of the RadDiagramRuler exposes 3 mesure types: Dip, Cm and Inch.
So if you want to display units in inches, you can set: 

<telerik:RadDiagramRuler Diagram="{Binding ElementName=xDiagram}"  MeasurementUnit="Inch"/>
More about the feature you can read in our help article - Ruler.

Regards,
Milena
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.
 
0
Rajkumar
Top achievements
Rank 1
answered on 28 May 2014, 10:19 AM
Hi Milena,

Got it ! I used the following code

 <Extensions:RadDiagramRuler Diagram="{Binding ElementName=diag}" Grid.Column="1" Placement="Top" MeasurementUnit="Cm" >
                <Extensions:RadDiagramRuler.ScaleDefinitions>
                    <Extensions:DiagramScaleDefinitionCollection>
                        <Extensions:DiagramScaleDefinition>
                            <Extensions:DiagramScaleItemDefinition Interval="0.1" Type="XSmallTick" />
                            <Extensions:DiagramScaleItemDefinition Interval="0.2" Type="SmallTick" />
                            <Extensions:DiagramScaleItemDefinition Interval="0.5" Type="MediumTick" />
                            <Extensions:DiagramScaleItemDefinition Interval="1" Type="LargeTick" />
                            <Extensions:DiagramScaleItemDefinition Interval="1" Type="Label" />
                        </Extensions:DiagramScaleDefinition>                        
                    </Extensions:DiagramScaleDefinitionCollection>
                </Extensions:RadDiagramRuler.ScaleDefinitions>
            </Extensions:RadDiagramRuler>

in my xaml and it worked.
Tags
Diagram
Asked by
Rajkumar
Top achievements
Rank 1
Answers by
Milena
Telerik team
Rajkumar
Top achievements
Rank 1
Share this question
or