You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm wondering how to use this with Eto-Wpf. I've tried a few things, but always get an ArgumentOutOfRangeException with the following message:
{"Specified argument was out of the range of valid values.\r\nParameter name: Type for 'Eto.OxyPlot.Plot' could not be found in this platform"} with stacktrace
at Eto.Widget..ctor()
at Eto.OxyPlot.Plot..ctor()
at EtoOxyPlotTest.MainForm..ctor() in D:\zandbak\EtoOxyPlotTest\EtoOxyPlotTest\MainForm.xeto.cs:line 25
at EtoOxyPlotTest.Desktop.Program.Main(String[] args) in D:\zandbak\EtoOxyPlotTest\EtoOxyPlotTest.Desktop\Program.cs:line 12
public MainForm()
{
XamlReader.Load(this);
StackLayout sl = FindChild<StackLayout>("_my");
Plot p = new Plot(); // here I get the exception
p.Model = new PlotModel();
p.Model.Title = "Example";
p.Model.Series.Add(new FunctionSeries(Math.Cos, 0, 10, 0.01, "cos(x)"));
sl.Items.Add(new StackLayoutItem(p));
}
I would be very grateful if you could share an example project or help me to get this working.
The text was updated successfully, but these errors were encountered:
FWIW i figured it out, had to put the platform handler in the Main() method.
var pf = Platform.Detect;
if (pf.IsWpf)
{
pf.Add(typeof(Plot.IHandler), () => new Eto.OxyPlot.Wpf.PlotHandler());
}
else
{
Console.WriteLine($"{pf.ID} is not supported.");
return;
}
new Application(pf).Run(new MainForm());
Hi,
I'm wondering how to use this with Eto-Wpf. I've tried a few things, but always get an
ArgumentOutOfRangeException
with the following message:{"Specified argument was out of the range of valid values.\r\nParameter name: Type for 'Eto.OxyPlot.Plot' could not be found in this platform"} with stacktrace
at Eto.Widget..ctor()
at Eto.OxyPlot.Plot..ctor()
at EtoOxyPlotTest.MainForm..ctor() in D:\zandbak\EtoOxyPlotTest\EtoOxyPlotTest\MainForm.xeto.cs:line 25
at EtoOxyPlotTest.Desktop.Program.Main(String[] args) in D:\zandbak\EtoOxyPlotTest\EtoOxyPlotTest.Desktop\Program.cs:line 12
I use the following MainForm.xeto XAML file
and code-behind
I would be very grateful if you could share an example project or help me to get this working.
The text was updated successfully, but these errors were encountered: