Hi,
I need to create gauges dynamically and put them in a WrapPanel. So I created a user control as follows:
The code behind looks like:
It all works fine if I add just one
PercentUtilizationGauge to the WrapPanel. However as soon as I add second
PercentUtilizationGauge several excaptions of type System.InvalidOperationException are thrown:
A first chance exception of type 'System.InvalidOperationException' occurred in System.Core.dll
Additional information: Sequence contains no matching element
They all seem to occur in Telerik code - the call stack looks like:
> System.Core.dll!System.Linq.Enumerable.First<object>(System.Collections.Generic.IEnumerable<object> source, System.Func<object,bool> predicate) + 0x150 bytes
Telerik.Windows.Controls.Gauge.dll!Telerik.Windows.Controls.Gauges.ScaleBase.FindOffPosition(Telerik.Windows.Controls.Gauges.IGaugeIndicator indicator = {Telerik.Windows.Controls.Gauges.Needle}) Line 1930 + 0x7b bytes C#
Telerik.Windows.Controls.Gauge.dll!Telerik.Windows.Controls.Gauges.RadialScale.ArrangeIndicator(Telerik.Windows.Controls.Gauges.IGaugeIndicator indicator = {Telerik.Windows.Controls.Gauges.Needle}) Line 314 + 0xc bytes C#
Telerik.Windows.Controls.Gauge.dll!Telerik.Windows.Controls.Gauges.IndicatorBase.ArrangeOverride(System.Windows.Size finalSize = {162,30}) Line 1121 C#
Telerik.Windows.Controls.Gauge.dll!Telerik.Windows.Controls.Gauges.Needle.ArrangeOverride(System.Windows.Size finalSize = {162,30}) Line 94 + 0x26 bytes C#
So how do I find out what is going wrong here? Any help would be greatly appreciated.
Thanks
-Ambar