GaugeBarIndicator is not a view

2 posts, 0 answers
  1. Pavol
    Pavol avatar
    1 posts
    Member since:
    Apr 2017

    Posted 27 Apr Link to this post

    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

     

  2. Petar Marchev
    Admin
    Petar Marchev avatar
    996 posts

    Posted 27 Apr Link to this post

    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
Back to Top