Can't display oxyplot in Xaml.

Oystein Bjorke il y a 7 ans 0
This discussion was imported from CodePlex

MartijnCarol wrote at 2013-10-30 16:32:

I've used the OxyPlot.Wpf nugetpackage and added in the Xaml.
          <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

_Noctis_ wrote at 2013-11-01 10:07:

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 ... )

_Noctis_ wrote at 2013-11-04 14:01:

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 ...)

richardfen wrote at 2013-11-04 20:01:

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:

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


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

Then from the tree select: Source | Examples | WPF | SimpleDemo

objo wrote at 2013-11-05 19:00:

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!

akmm94 wrote at 2014-06-20 04:40:

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.