I am binding sfChart dynamically in viewmodel and it works fine in Android but in UWP, it crashes with the exception below. It works only if I hardcode something like
System.ArgumentNullException occurred
HResult=0x80004003
Message=Value cannot be null.
Source=
StackTrace:
at System.StubHelpers.HStringMarshaler.ConvertToNativeReference(String managed, HSTRING_HEADER* hstringHeader)
at Windows.UI.Xaml.Controls.TextBlock.put_Text(String value)
at Syncfusion.SfChart.XForms.UWP.ChartTitleMapping.OnChartTitlePropertiesChanged(String propertyName, ChartTitle formChartTitle, Border border)
at Syncfusion.SfChart.XForms.UWP.SfChartMapping.OnChartPropertiesChanged(String propertyName, SfChart formsChart, SfChart nativeChart)
at Syncfusion.SfChart.XForms.UWP.SfChartRenderer.GetNativeChart(SfChart sfChart)
at Syncfusion.SfChart.XForms.UWP.SfChartRenderer.OnElementChanged(ElementChangedEventArgs`1 e)
at Xamarin.Forms.Platform.UWP.VisualElementRenderer`2.SetElement(VisualElement element)
at Xamarin.Forms.Platform.UWP.Platform.CreateRenderer(VisualElement element)
at Xamarin.Forms.Platform.UWP.VisualElementPackager.OnChildAdded(Object sender, ElementEventArgs e)
at Xamarin.Forms.Platform.UWP.VisualElementPackager.Load()
at Xamarin.Forms.Platform.UWP.VisualElementRenderer`2.SetElement(VisualElement element)
at Xamarin.Forms.Platform.UWP.Platform.CreateRenderer(VisualElement element)
at Xamarin.Forms.Platform.UWP.VisualElementPackager.OnChildAdded(Object sender, ElementEventArgs e)
at Xamarin.Forms.Platform.UWP.VisualElementPackager.Load()
at Xamarin.Forms.Platform.UWP.VisualElementRenderer`2.SetElement(VisualElement element)
at Xamarin.Forms.Platform.UWP.Platform.CreateRenderer(VisualElement element)
at Xamarin.Forms.Platform.UWP.VisualElementPackager.OnChildAdded(Object sender, ElementEventArgs e)
at Xamarin.Forms.Platform.UWP.VisualElementPackager.Load()
at Xamarin.Forms.Platform.UWP.VisualElementRenderer`2.SetElement(VisualElement element)
at Xamarin.Forms.Platform.UWP.Platform.CreateRenderer(VisualElement element)
at Xamarin.Forms.Platform.UWP.VisualElementExtensions.GetOrCreateRenderer(VisualElement self)
at Xamarin.Forms.Platform.UWP.NavigationPageRenderer.SetPage(Page page, Boolean isAnimated, Boolean isPopping)
at Xamarin.Forms.Platform.UWP.NavigationPageRenderer.OnPushRequested(Object sender, NavigationRequestedEventArgs e)
at Xamarin.Forms.NavigationPage.
d__90.MoveNext() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Xamarin.Forms.NavigationPage.
d__48.MoveNext() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)