Gague - change values in run time

1 Answer 79 Views
Gauge
Daniel
Top achievements
Rank 1
Silver
Bronze
Daniel asked on 07 Mar 2022, 02:05 PM | edited on 07 Mar 2022, 02:06 PM

Hi,

How I change in run time(in code behind):

-GeneralLinerAxis/Maximun property.

-GaugeNeedleIndicator - Value property.

- GaugeShapeIndicator - Value property.

 <telerikGauges:RadRadialGauge x:Name="gaugeTotalFiles"  >
                    <telerikGauges:RadRadialGauge.Axis>
                            <telerikGauges:GaugeLinearAxis Maximum="200"
                                     Minimum="0"
                                     Step="25" />
                    </telerikGauges:RadRadialGauge.Axis>
                    <telerikGauges:RadRadialGauge.Indicators>
                        <telerikGauges:GaugeNeedleIndicator Offset="30" Value="60" />
                        <telerikGauges:GaugeShapeIndicator Value="80" />
                    </telerikGauges:RadRadialGauge.Indicators>
                    <telerikGauges:RadRadialGauge.Ranges>
                        <telerikGauges:GaugeRangesDefinition>
                            <telerikGauges:GaugeRange Color="#03446a"
                                    From="0"
                                    To="200" />
                          </telerikGauges:GaugeRangesDefinition>
                    </telerikGauges:RadRadialGauge.Ranges>
                </telerikGauges:RadRadialGauge>


1 Answer, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 10 Mar 2022, 05:37 PM

Hello Daniel,

You can change the 3 properties in your Code Behind by setting a name for the specific control in the same way you've given a name for the RadRadialGauge control in the MainPage.xaml. Here's a GaugeLinearAxis example on how to change its Maximum property through the Code Behind:

MainPage.xaml:

<telerikGauges:GaugeLinearAxis x:Name="gaugeAxis" />

MainPage.xaml.cs:

this.gaugeAxis.Maximum = 200;

If you have any further inquiries, please let us know.

Best Regards, Deyan Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Gauge
Asked by
Daniel
Top achievements
Rank 1
Silver
Bronze
Answers by
Deyan
Telerik team
Share this question
or