Hidden legend still handles mouse clicks at the location where it was before hiding. Clicking an empty place hides/shows line series. After the form is resized, clicks are still handled at the location where legend were last visible. Plot contains multiple line series.
The legend is created with
plotModel.Legends.Add(new OxyPlot.Legends.Legend());
Hiding a legend with
plotModel.IsLegendVisible = showLegendCheckBox.Checked;
OxyPlot.WPF 2.1.2.0 from Nuget manager, running in a WindowsForms application in a ElementHost. .NET Framework 4.5.2