OxyPlot "Exception thrown: 'System.InvalidOperationException' in OxyPlot.Xamarin.Forms.dll"

115 Views Asked by At

I have 2 questions regarding the OxyPlot library.

  1. So I'm well aware that OxyPlot is supported for Xamarin.Forms, Xamarin.Forms.Android, Xamarin.Forms.iOS, and Xamarin.Forms.Mac. However, I was wondering if this library supports Xamarin Forms WPF. I know it works on WPF applications, but not in Xamarin Forms WPF. I checked in NuGet Package store, and none was found.

  2. I get this error regarding running my Xamarin Forms project. I am creating a Xamarin Forms WPF project that will display a chart. But I keep getting this error. This is the error I'm getting

Does anybody know why I'm getting this error? From my understanding, you need to initialize it. For example, for Android projects, you use

OxyPlot.Xamarin.Forms.Platform.Android.PlotViewRenderer.Init();.

But for Xamarin Forms WPF, there is no initialization function. Can anyone help me in regards to this problem? Thank you so much.

I tried initializing, but there's no initialize function for Xamarin Forms WPF. For example:

• iOS:

OxyPlot.Xamarin.Forms.Platform.iOS.PlotViewRenderer.Init();

• Android:

OxyPlot.Xamarin.Forms.Platform.Android.PlotViewRenderer.Init();

• Universal Windows:

OxyPlot.Xamarin.Forms.Platform.UWP.PlotViewRenderer.Init();

• Windows Phone:

OxyPlot.Xamarin.Forms.Platform.WP8.PlotViewRenderer.Init();

• WPF: ???

0

There are 0 best solutions below