/// <summary>
        /// Mouse button pressed in the control.
        /// </summary>
        /// <param name="e">Event arguments.</param>
        /// <param name="isHandled">Returns true if event is handled and no further processing required.</param>
        internal void OnMouseDown(MouseEventArgs e, ref bool isHandled)
        {
            // Reset last clicked annotation object and stop text editing
            if (lastClickedAnnotation != null)
            {
                TextAnnotation textAnnotation = lastClickedAnnotation as TextAnnotation;
                if (textAnnotation != null)
                {
                    // Stop annotation text editing
                    textAnnotation.StopTextEditing();
                }
                lastClickedAnnotation = null;
            }

            // Check if in annotation placement mode
            if (this.placingAnnotation != null)
            {
                // Process mouse down
                this.placingAnnotation.PlacementMouseDown(new PointF(e.X, e.Y), e.Button);

                // Set handled flag
                isHandled = true;
                return;
            }

            // Process only left mouse buttons
            if (e.Button == MouseButtons.Left)
            {
                bool updateRequired = false;
                this._resizingMode = ResizingMode.None;

                // Check if mouse buton was pressed in any selection handles areas
                Annotation annotation =
                    HitTestSelectionHandles(new PointF(e.X, e.Y), ref this._resizingMode);

                // Check if mouse button was pressed over one of the annotation objects
                if (annotation == null && this.Count > 0)
                {
                    HitTestResult result = this.Chart.HitTest(e.X, e.Y, ChartElementType.Annotation);
                    if (result != null && result.ChartElementType == ChartElementType.Annotation)
                    {
                        annotation = (Annotation)result.Object;
                    }
                }

                // Unselect all annotations if mouse clicked outside any annotations
                if (annotation == null || !annotation.IsSelected)
                {
                    if ((Control.ModifierKeys & Keys.Control) != Keys.Control &&
                        (Control.ModifierKeys & Keys.Shift) != Keys.Shift)
                    {
                        foreach (Annotation annot in this.Chart.Annotations)
                        {
                            if (annot != annotation && annot.IsSelected)
                            {
                                annot.IsSelected = false;
                                updateRequired   = true;

                                // Call selection changed notification
                                if (this.Chart != null)
                                {
                                    this.Chart.OnAnnotationSelectionChanged(annot);
                                }
                            }
                        }
                    }
                }

                // Process mouse action in the annotation object
                if (annotation != null)
                {
                    // Mouse down event handled
                    isHandled = true;

                    // Select/Unselect annotation
                    Annotation selectableAnnotation = annotation;
                    if (annotation.AnnotationGroup != null)
                    {
                        // Select annotation group when click on any child annotations
                        selectableAnnotation = annotation.AnnotationGroup;
                    }
                    if (!selectableAnnotation.IsSelected && selectableAnnotation.AllowSelecting)
                    {
                        selectableAnnotation.IsSelected = true;
                        updateRequired = true;

                        // Call selection changed notification
                        if (this.Chart != null)
                        {
                            this.Chart.OnAnnotationSelectionChanged(selectableAnnotation);
                        }
                    }
                    else if ((Control.ModifierKeys & Keys.Control) == Keys.Control ||
                             (Control.ModifierKeys & Keys.Shift) == Keys.Shift)
                    {
                        selectableAnnotation.IsSelected = false;
                        updateRequired = true;

                        // Call selection changed notification
                        if (this.Chart != null)
                        {
                            this.Chart.OnAnnotationSelectionChanged(selectableAnnotation);
                        }
                    }

                    // Remember last clicked and selected annotation
                    lastClickedAnnotation = annotation;

                    // Rember mouse position
                    this._movingResizingStartPoint = new PointF(e.X, e.Y);

                    // Start moving, repositioning or resizing of annotation
                    if (annotation.IsSelected)
                    {
                        // Check if one of selection handles was clicked on
                        this._resizingMode = annotation.GetSelectionHandle(this._movingResizingStartPoint);
                        if (!annotation.AllowResizing &&
                            this._resizingMode >= ResizingMode.TopLeftHandle &&
                            this._resizingMode <= ResizingMode.LeftHandle)
                        {
                            this._resizingMode = ResizingMode.None;
                        }
                        if (!annotation.AllowAnchorMoving &&
                            this._resizingMode == ResizingMode.AnchorHandle)
                        {
                            this._resizingMode = ResizingMode.None;
                        }
                        if (this._resizingMode == ResizingMode.None && annotation.AllowMoving)
                        {
                            // Annotation moving mode
                            this._resizingMode = ResizingMode.Moving;
                        }
                    }
                    else
                    {
                        if (this._resizingMode == ResizingMode.None && annotation.AllowMoving)
                        {
                            // Do not allow moving child annotations inside the group.
                            // Only the whole group can be selected, resized or repositioned.
                            if (annotation.AnnotationGroup != null)
                            {
                                // Move the group instead
                                lastClickedAnnotation = annotation.AnnotationGroup;
                            }

                            // Annotation moving mode
                            this._resizingMode = ResizingMode.Moving;
                        }
                    }
                }

                // Update chart
                if (updateRequired)
                {
                    // Invalidate and update the chart
                    this.Chart.Invalidate(true);
                    this.Chart.UpdateAnnotations();
                }
            }
        }