DateTimeAxis, vb and WPF error

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

kelvinlaw wrote at 2012-09-10 16:18:

Anyone else using this library with the combination DateTimeAxis 2010 +WPF?

I'm getting an error on creating an axis:

'.ctor' is ambiguous because multiple kinds of members with this name exist in class 'OxyPlot.DateTimeAxis'

with the code: (error is on the variable)

Dim xAxis As New DateTimeAxis()
xAxis.IntervalType = DateTimeIntervalType.Months
xAxis.Title = "Time"

Am I using this wrong or is this an error with the vb only?

kelvinlaw wrote at 2012-09-10 19:16:

Looking into it a bit more VB has an issue with constructors where the properties are optional:


public DateTimeAxis()

public DateTimeAxis( AxisPosition pos = AxisPosition.Bottom, string title = null, string format = null, DateTimeIntervalType intervalType = DateTimeIntervalType.Auto) : base(pos, title)

Commenting out the first constructor gets rid of the problem.