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

GaugeBarIndicator is not a view

1 Answer 77 Views
Gauges
This is a migrated thread and some comments may be shown as answers.
Pavol
Top achievements
Rank 1
Pavol asked on 27 Apr 2017, 08:06 AM

I'm trying to use GaugeBarIndicator but still I'm getting error:

Severity Code Description Project File Line Suppression State
Error CS1503 Argument 1: cannot convert from 'Telerik.XamarinForms.DataVisualization.Gauges.GaugeBarIndicator' to 'Xamarin.Forms.View'

 

code snipet:

GaugeBarIndicator indicator = new GaugeBarIndicator();
this.Content = new StackLayout
{
    Children =
   {
      indicator
   }
};

 

When I try to use it in XAML:

<telerikGauges:GaugeBarIndicator x:Name="gauge" Value="75"
Fill="Green"
Offset="15"
StartThickness="0" />

 

I get error:

 No property, bindable property, or event found for 'Content'

How can I resolve this issue?

Thanks for prompt response

 

1 Answer, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 27 Apr 2017, 10:32 AM
Hello Pavol,

The bar indicator, or any other indicator for that matter, is not a UI element. The indicators are parts that belong to a Gauge. The Gauge is the UI element, and it is the Gauge that you should attach in the visual tree. You can add the indicator at hand in the Indicators collection of the Gauge. Do not forget to properly set up the gauge's Axis (its min, max and step) otherwise the Value of the indicator will not be drawn correctly, because the axis range is undefined.

Regards,
Petar Marchev
Telerik by Progress
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
Pavol
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Share this question
or