Skip to content

MouseDown event does not fire on Xamarin Mac graph points #32

Open
@pkoscierzynski

Description

@pkoscierzynski

I am trying to implement a handling clicks on points marked on the graph in Xamarin Mac application. However, the MouseDown event is never call when a point displayed on the graph is clicked.
The same code works fine on Windows version of the same application.

var pointAnnotation = new LineSeries
{
Title = GetYAxisName(graphType),
StrokeThickness = 0,
LineLegendPosition = LineLegendPosition.None,
MarkerFill = OxyColors.DarkTurquoise,
MarkerStroke = OxyColors.DarkTurquoise,
MarkerType = MarkerType.Circle,
TrackerKey = "Calculations",
MarkerSize = 5
};

/// Adding points in the loop
pointAnnotation.Points.Add(new DataPoint((double)valueX, (double)valueY);
//

//adding event handler
pointAnnotation.MouseDown += (s, e) =>
{
if (e.ChangedButton == OxyMouseButton.Left)
{
e.Handled = true;
}
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions