Databind a linear gauges indicators

3 posts, 1 answers
  1. Johan
    Johan avatar
    5 posts
    Member since:
    Aug 2012

    Posted 21 Nov 2012 Link to this post

    Hi!
    I have created a Linear Gauge in my WP app by using the Smart Tag.
    This results in some of the xaml I pasted in below.
    How can I databind the three places where the value is hardcoded to 27.67?
    I have tried to bind them to an existing value  in my viewmodel,  {Binding MyViewModelValue} , but the result is 0,0 regardless my viewmodel value when running the app.
    TIA
    /Johan
    <gauges:RadGauge Margin="0,92,0,0">
    ...
      <gauges:LinearBarGaugeIndicator x:Name="indicator1" BarBrush="{StaticResource PhoneForegroundBrush}" BarThickness="8" IsAnimated="True" RenderTransform="{StaticResource indicatorNudge}" Value="27.67"/>
      <gauges:MarkerGaugeIndicator x:Name="indicator2" IsAnimated="True" gauges:LinearGaugeRange.IndicatorOffset="7" Value="27.67">
    ...
    <gauges:MarkerGaugeIndicator x:Name="indicator3" IsAnimated="True" gauges:LinearGaugeRange.IndicatorOffset="12" Value="27.67">
  2. Answer
    Victor
    Admin
    Victor avatar
    1351 posts

    Posted 22 Nov 2012 Link to this post

    Hello Johan,

    Thanks for writing.
    Please verify that your view model implements the INotifyPropertyChanged interface. Also please verify that the data context of your chart is your view model. If the interface is implemented and the data context is correct, please write again so that I can assist you further.

    I am looking forward to your reply.

    Kind regards,
    Victor
    the Telerik team
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  3. DevCraft banner
  4. Johan
    Johan avatar
    5 posts
    Member since:
    Aug 2012

    Posted 22 Nov 2012 Link to this post

    Lesson learned; don't refactor code while watching UEFA Champions League on tv.
    I kind of removed the call to the method setting the actual gauge values.

    The databinding works perfectly.
    Thnx Victor.

    /Johan 
Back to Top