Hi Joern,
1. Problem
When the entire form is resized or even maximized, the Legend automatically is moved to the upper right corner of the chart area (which is good). But in such a case, the OnEndDrag event is not fired. Is there a way to detect such an case with the LegendMoveTool (force somehow an OnEndDrag event)?
You can attach to the ContentAreaChanged event of the legend which if fired each time the content area changes (this is valid for app panels)
2. Setting the Legend position
When I use the OnEndDrag to determine Legend position;
NPoint oPoint = ((NMouseEventArgs)eIn).Location; // Coordinates of the Legends lower right corner ?
int iX = oPoint.X;
int iY = oPoint.Y;
and use iX / iY afterwards to set the position:
NLegend oLegend = m_listCharts[i].Chart.DisplayOnLegend;
oLegend.Location = new NPointL(iX, iY);
When you set the location in this way it is actually specified in points – you need to ensure the location is specified in pixels in this case:
legend.Location = new NPointL(new NLength(x, NGraphicsUnit.Pixel), new NLength(y, NGraphicsUnit.Pixel));
Please elaborate on the last problem if it still persist after you change the location to use pixels instead of points.