We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Ranges binding


I tried to bind the SfLinearGauge Ranges with no success. Ranges is a public ViewModel property of type LinearRangeCollection which is populated programmatically.

This is a simplified version of what I tried:

    <syncfusion:LinearScale Minimum="0" Maximum="1000" Ranges="{Binding Ranges}"/>

public LinearRangeCollection Ranges
    return new LinearRangeCollection()
      new LinearRange() { StartValue=0, EndValue=100, RangeStroke=new SolidColorBrush(Colors.Green) },
      new LinearRange() { StartValue=100, EndValue=300, RangeStroke=new SolidColorBrush(Colors.Blue) }

I already get a NullReferenceException in the XAML designer:

 bei Syncfusion.UI.Xaml.Gauges.LinearScale.ResetRanges()
   bei Syncfusion.UI.Xaml.Gauges.LinearScale.Refresh()
   bei Syncfusion.UI.Xaml.Gauges.SfLinearGauge.MeasureOverride(Size availableSize)
   bei System.Windows.FrameworkElement.MeasureCore(Size availableSize)

Is this not supported or am I doing something wrong?


1 Reply

AK Ashwin Kumaravel Syncfusion Team September 14, 2017 10:54 AM UTC

Hi Bernd,

Thanks for using Syncfusion products,

We could reproduce the reported issue “Getting NullReference Exception when binding Ranges” at our end. And we have logged a defect report regarding the same. A support incident to track the status of this defect has been created under your account.

Please log on to our support website to check for further updates.


Ashwin K

Live Chat Icon For mobile
Up arrow icon