Can't display oxyplot in Xaml.

Oct 30, 2013 at 3:32 PM
Edited Oct 30, 2013 at 4:36 PM
I've used the OxyPlot.Wpf nugetpackage and added in the Xaml.
   xmlns:oxy="clr-namespace:OxyPlot.Wpf;assembly=OxyPlot.Wpf"
and
          <oxy:Plot Margin="0" Grid.Column="1" Model="{Binding ViewModelTest.ChartModelECG, Source={StaticResource Locator}}"/> />
But keep getting this error

Method 'DrawEllipse' in type 'OxyPlot.Wpf.ShapesRenderContext' from assembly 'OxyPlot.Wpf, Version=2013.2.107.1, Culture=neutral, PublicKeyToken=75e952ba404cdbb0' does not have an implementation

If I change the nugetpacked to OxyPlot.Wpf_noPCL can see the chart in Xaml but cant start the prodject due to conflicts with he mvvm-light libery where as soon as I add plotModel1 = new PlotModel(); the following error acures

An exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll but was not handled in user code

anny Idea what i'm dooing wrong?


Martijn Carol
Nov 1, 2013 at 9:07 AM
Weird, I'm using OxyPlot with Mvvm-Light, and it works like a charm (well, I do need to bend some things backwards, but hey, it's still great)

Did you try downloading the dll's, and just adding them to your references in the project ? (I think this is what I did ... )
Nov 4, 2013 at 1:01 PM
Weird ... I just ran into this problem with a new project after installing it from Nuget ...
Did you try installing the Nuget, cleaning the project, closing the VS and opening it again ?
(Seems it worked for some people, and between this and actually installing local dll's , it might have been the solution ...)
Nov 4, 2013 at 7:01 PM
I had exactly the same problem when I used NuGet. The suggestion above to just download the DLL's worked. You do this by going to:

http://oxyplot.codeplex.com/releases/view/76035

download the zip file and extract all the DLL's. I took the 4.5 versions and referenced the following:

OxyPlot.dll
OxyPlot.Wpf
OxyPlot.Xps.dll

The program that I used the above to build successfully was SimpleDemo. You can get this sample by doing to:

https://oxyplot.codeplex.com/SourceControl/latest#readme.txt

Then from the tree select: Source | Examples | WPF | SimpleDemo
Coordinator
Nov 5, 2013 at 6:00 PM
I just realized there was an error in the Nuget package, the dependency to the OxyPlot.Core package was pointing at the wrong version.
This should be fixed from version 2013.2.114.1!
Jun 20, 2014 at 2:40 AM
Hi All,

When I am calling a new window to show up Oxy plot it just does not show up at all. If I open the window by itself it shows the plot. But if I call from another window it just does not show up. What can be the reason? Any help would be appreciated.