Problems with Metro

Oystein Bjorke 6 years ago 0
This discussion was imported from CodePlex

doctorj wrote at 2012-09-16 23:53:


I am working on a Windows 8 project using metro and have some problems. I was able to include the two dll in the project and am able to import the namespaces on the VB part of a display.

I do not know how to have the xaml part of the screen recognize oxyplot or oxyplot.metro. These statements work except that I see no plot outline on the screen. I do have a white background. I believe the problem is that I do not  know how to make then xaml part of the code to recognize oxyplot. I would like to get this working for my app. If there is any more documentation that would greatly help. I used zedgraph on windows forms and good success but this is the only plotting program I have seen that will work in metro.

I simple example using vs2012 and metro app would help in either vb or c#.

 Thank you for your help




plotControl As New OxyPlot.Metro.



Dim plotModel1 As New OxyPlot.


plotModel1.Title =





New LinearAxis(AxisPosition

.Bottom, -20, 80))


New LinearAxis(AxisPosition  






.Bottom, -10, 10))

plotControl.Model = plotModel1




objo wrote at 2012-09-17 07:27:

Did you look at the Metro examples?

See how the view is defined in the XAML file:


doctorj wrote at 2012-09-17 16:49:

Thank you for your response. That helped , I had to download the metro stuff again and I from the xaml file. I took the commands from it for oxy and inserted in my xaml file and these commands were recognized ok. However when I executed the code with my vb code , no graph came up. I was expecting to see at the axes of the graph. Do I need the other xaml files you have in the BasicSample directory also? I also noticed that the BasicSample directory did not have a Project file so I could execute the project - is it supposed to be like that? in my VB project I have a Visual Basic Project File that I click on to start the project. Is it possible that I am not executing the right oxy commands in my vb code. I am posting the code here again.

 Dim plotControl As New OxyPlot.Metro.Plot
        Dim plotModel1 As New OxyPlot.PlotModel
        plotModel1.Title = "Outside"
        plotModel1.Axes.Add(New LinearAxis(AxisPosition.Bottom, -20, 80))
        plotModel1.Axes.Add(New LinearAxis(AxisPosition.Bottom, -10, 10))
        plotControl.Model = plotModel1











//<//oxy:Plot Model="{Binding PlotModel


 code I put in my xaml file