SquaredPanel.ArrangeOverride: Value Does not fall within the expected range

Hello,

I am attempting to add a list of SfCircular Gauges to a Grid in a UWP application. I can do it manually like this and it works (using version 14.4.0.15:

            Gauge1 = new SfCircularGauge();
            Gauge2 = new SfCircularGauge();
            Gauge3 = new SfCircularGauge();
            Gauge4 = new SfCircularGauge();


            var update1 = new ViewModelCircularGauge().CreateGauge(Gauge1, SensorTypeEnum.Refrigerator);
            var update2 = new ViewModelCircularGauge().CreateGauge(Gauge2, SensorTypeEnum.Freezer);
            var update3 = new ViewModelCircularGauge().CreateGauge(Gauge3, SensorTypeEnum.WaterBath);
            var update4 = new ViewModelCircularGauge().CreateGauge(Gauge4, SensorTypeEnum.HeatBlock);

            this.Grid.Children.Add(update1);
            this.Grid.Children.Add(update2);
            this.Grid.Children.Add(update3);
            this.Grid.Children.Add(update4);

            Grid.SetColumn(update1, 0);
            Grid.SetRow(update1, 0);

            Grid.SetColumn(update2, 1);
            Grid.SetRow(update2, 0);

            Grid.SetColumn(update3, 0);
            Grid.SetRow(update3, 1);

            Grid.SetColumn(update4, 1);
            Grid.SetRow(update4, 1);

However, when I try to use a list of SfCircularGauges like this, I get the error:

            var gauges = new View.View().CreateGaugesFromConfigFile();

            switch (gauges.Count)
            {
                case 1:
                    foreach (var sfCircularGauge in gauges)
                    {
                        Grid.Children.Add(sfCircularGauge);
                    }
                    Grid.SetColumn(gauges[0], 0);
                    Grid.SetRow(gauges[0], 0);
                    break;
                case 2:
                    foreach (var sfCircularGauge in gauges)
                    {
                        Grid.Children.Add(sfCircularGauge);
                    }
                    Grid.SetColumn(gauges[0], 0);
                    Grid.SetRow(gauges[0], 0);
                    Grid.SetColumn(gauges[1], 1);
                    Grid.SetRow(gauges[1], 0);
                    break;
                case 4:
                    foreach (var sfCircularGauge in gauges)
                    {
                        Grid.Children.Add(sfCircularGauge);
                    }
                    Grid.SetColumn(gauges[0], 0);
                    Grid.SetRow(gauges[0], 0);
                    Grid.SetColumn(gauges[1], 1);
                    Grid.SetRow(gauges[1], 0);
                    Grid.SetColumn(gauges[2], 0);
                    Grid.SetRow(gauges[2], 1);
                    Grid.SetColumn(gauges[3], 1);
                    Grid.SetRow(gauges[3], 1);
                    break;
            }

Here is the full error message:
System.ArgumentException: Value does not fall within the expected range.
   at Windows.UI.Xaml.UIElement.Measure(Size availableSize)
   at Syncfusion.UI.Xaml.Gauges.SquaredPanel.ArrangeOverride(Size finalSize)

Thanks!

1 Reply

AK Ashwin Kumaravel Syncfusion Team April 3, 2017 10:54 AM UTC

Hi Grant,

Thanks for contacting Syncfusion Support.

We were able to reproduce the reported issue “Crash occurs-Value Does not fall within the expected range in SfCircularGauge” 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.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents/   

Regards,
Ashwin.k

Loader.
Up arrow icon