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

Marker showing up behind Gauge Range

1 Answer 13 Views
Gauges
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 10 Dec 2015, 06:35 PM

Having a problem where my marker is showing up behind the background on my gauge range. Here is my code. 

 

  <telerik:VerticalLinearScale IsInteractive="False" Max="100" Min="0" Foreground="Black" >
                        <telerik:GaugeRange Min="0" Max="80" Background="Green"></telerik:GaugeRange>
                        <telerik:GaugeRange Min="80" Max="100" Background="Red"></telerik:GaugeRange>
                        <telerik:LinearScaleMarker  x:Name="indicator" telerik:LinearScale.RotateForVertical="True" telerik:ScaleObject.Location="OverCenter"  Value="{Binding Path=myEngine.PercentLoaded}" />
                    </telerik:VerticalLinearScale>

 

Everything works fine, its just that the marker is behind the gauge range backgrounds.

1 Answer, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 11 Dec 2015, 01:28 PM
Hi Robert,

To achieve your goal you can put the LinearScaleMarker inside the Indicators collection of the VerticalLinearScale control. Here is you code modified, so the marker is on top:
<telerik:VerticalLinearScale IsInteractive="False" Max="100" Min="0"
                             Foreground="Black" >
 <telerik:GaugeRange Min="0" Max="80" Background="Green" />
 <telerik:GaugeRange Min="80" Max="100" Background="Red" />
 <telerik:VerticalLinearScale.Indicators>
    <telerik:LinearScaleMarker x:Name="indicator"
     telerik:LinearScale.RotateForVertical="True"
     telerik:ScaleObject.Location="OverCenter"
      Value="25" />
 </telerik:VerticalLinearScale.Indicators>      
</telerik:VerticalLinearScale>
You can also take a look at the Creating Linear Gauge SDK demo.

Regards,
Ivan
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Gauges
Asked by
Robert
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Share this question
or