This question is locked. New answers and comments are not allowed.
Hi.
I've got a Linear gauge on my page with the Orientation set to horizontal.
Here is the description of the problem:
The gauge is in a dynamically sizing container, for example, It might be 100x500 at first. When the height reaches a smaller amount than the width (which i am checking on sizechanged event), I automatically set the linearscale element to horizontal alignment.
When this starts off it is fine. So the width is now (for example) 200x199 and the gauge fits in well.
When I keep dragging the container outwards, the width of the elements increase (as can be observed using actualwidth property) but the height does not increase. Yet, linearscale i am working with seems to be moving downwards as i add width.
If you have a look at the following example (from http://www.telerik.com/community/forums/silverlight/gauge/horizontal-linear-gauge.aspx):
you will see that the "Top" property is set to 0.15 to make the gauge fit into 300x100 size. "Top" property of 0.5 will work if the width and height are roughly the same, putting the scale in the middle.
If i keep adding width to the container of the linearscale (but not adding any height) I need to keep reducing the 'top' property of the gauge for it to fit, until eventually the physical size of the linear bar is too big to fit into the container's height.
If you compare this to vertical gauge, a "left" property of 0.5 will always keep the linearscale positioned right in the horizontal-centre of the area, whether we add or remove height it does not move out to the side.
Any suggestions? Can you please test this and see if there is some kind of setting that will avoid this scenario?
Thank you!
Paul
I've got a Linear gauge on my page with the Orientation set to horizontal.
Here is the description of the problem:
The gauge is in a dynamically sizing container, for example, It might be 100x500 at first. When the height reaches a smaller amount than the width (which i am checking on sizechanged event), I automatically set the linearscale element to horizontal alignment.
When this starts off it is fine. So the width is now (for example) 200x199 and the gauge fits in well.
When I keep dragging the container outwards, the width of the elements increase (as can be observed using actualwidth property) but the height does not increase. Yet, linearscale i am working with seems to be moving downwards as i add width.
If you have a look at the following example (from http://www.telerik.com/community/forums/silverlight/gauge/horizontal-linear-gauge.aspx):
<Grid Width="300" Height="100" Background="Aqua"> |
<gauge:LinearScale Name="linearScale" |
Orientation="Horizontal" |
Left="0.05" |
Top="0.15" |
RelativeHeight="0.9"> |
<gauge:IndicatorList> |
<gauge:LinearBar Name="linearBar" Value="20" /> |
</gauge:IndicatorList> |
</gauge:LinearScale> |
</Grid> |
you will see that the "Top" property is set to 0.15 to make the gauge fit into 300x100 size. "Top" property of 0.5 will work if the width and height are roughly the same, putting the scale in the middle.
If i keep adding width to the container of the linearscale (but not adding any height) I need to keep reducing the 'top' property of the gauge for it to fit, until eventually the physical size of the linear bar is too big to fit into the container's height.
If you compare this to vertical gauge, a "left" property of 0.5 will always keep the linearscale positioned right in the horizontal-centre of the area, whether we add or remove height it does not move out to the side.
Any suggestions? Can you please test this and see if there is some kind of setting that will avoid this scenario?
Thank you!
Paul