// Keep this line for you BSD License obligations


        #endregion Private Fields

        #region Public Methods

        /// <summary>
        /// Constructor. Initializes all the class fields.
        /// </summary>
        public XYLineChart()
        {
            // This assumes that you are navigating to this scene.
            // If you will normally instantiate it via code and display it
            // manually, you either have to call InitializeComponent by hand or
            // uncomment the following line.

            InitializeComponent();

            TextCanvasInfo = new CanvasTransformInfo();

            primitiveList = new List <ChartPrimitive>();
            markerList    = new List <ChartMarkerSet>();
            intervalList  = new List <Interval>();
            // Set the Chart Geometry Clip region
            chartClip = new PathGeometry();
            chartClip.AddGeometry(
                new RectangleGeometry(new Rect(0, 0, clippedPlotCanvas.ActualWidth, clippedPlotCanvas.ActualHeight)));
            shapeTransform = new MatrixTransform();
            adornerMarkers = new AdornerChartMarkers(clippedPlotCanvas, shapeTransform, MarkerSets, this);
            adorner        = new AdornerCursorCoordinateDrawer(clippedPlotCanvas, shapeTransform);

            optimalGridLineSpacing = new Point(100, 75);

            panZoomCalculator =
                new PanZoomCalculator(new Rect(0, 0, clippedPlotCanvas.ActualWidth, clippedPlotCanvas.ActualHeight));
            panZoomCalculator.Window          = new Rect(0, 0, clippedPlotCanvas.ActualWidth, clippedPlotCanvas.ActualHeight);
            panZoomCalculator.PanZoomChanged += panZoomCalculator_PanZoomChanged;

            closestPointPicker = new ClosestPointPicker(new Size(13, 13));
            closestPointPicker.ClosestPointChanged += closestPointPicker_ClosestPointChanged;

            Cursor = Cursors.None;

            TextCanvasInfo.Canvas = textCanvas;

//            UniformScaling = true;

            // Set up all the message handlers for the clipped plot canvas
            AttachEventsToCanvas(this);

            //clippedPlotCanvas.Clip = chartClip;
            clippedPlotCanvas.IsVisibleChanged += clippedPlotCanvas_IsVisibleChanged;
            clippedPlotCanvas.SizeChanged      += clippedPlotCanvas_SizeChanged;
        }
        // Keep this line for you BSD License obligations


        #endregion Private Fields

        #region Public Methods

        /// <summary>
        /// Constructor. Initializes all the class fields.
        /// </summary>
        public XYLineChart()
        {
            // This assumes that you are navigating to this scene.
            // If you will normally instantiate it via code and display it
            // manually, you either have to call InitializeComponent by hand or
            // uncomment the following line.

            InitializeComponent();

            TextCanvasInfo = new CanvasTransformInfo();

            primitiveList = new List<ChartPrimitive>();
            markerList = new List<ChartMarkerSet>();
            intervalList = new List<Interval>();
            // Set the Chart Geometry Clip region
            chartClip = new PathGeometry();
            chartClip.AddGeometry(
                new RectangleGeometry(new Rect(0, 0, clippedPlotCanvas.ActualWidth, clippedPlotCanvas.ActualHeight)));
            shapeTransform = new MatrixTransform();
            adornerMarkers = new AdornerChartMarkers(clippedPlotCanvas, shapeTransform, MarkerSets, this);
            adorner = new AdornerCursorCoordinateDrawer(clippedPlotCanvas, shapeTransform);

            optimalGridLineSpacing = new Point(100, 75);

            panZoomCalculator =
                new PanZoomCalculator(new Rect(0, 0, clippedPlotCanvas.ActualWidth, clippedPlotCanvas.ActualHeight));
            panZoomCalculator.Window = new Rect(0, 0, clippedPlotCanvas.ActualWidth, clippedPlotCanvas.ActualHeight);
            panZoomCalculator.PanZoomChanged += panZoomCalculator_PanZoomChanged;

            closestPointPicker = new ClosestPointPicker(new Size(13, 13));
            closestPointPicker.ClosestPointChanged += closestPointPicker_ClosestPointChanged;

            Cursor = Cursors.None;

            TextCanvasInfo.Canvas = textCanvas;

//            UniformScaling = true;

            // Set up all the message handlers for the clipped plot canvas
            AttachEventsToCanvas(this);

            //clippedPlotCanvas.Clip = chartClip;
            clippedPlotCanvas.IsVisibleChanged += clippedPlotCanvas_IsVisibleChanged;
            clippedPlotCanvas.SizeChanged += clippedPlotCanvas_SizeChanged;
        }