void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this._graphSystem = ((Microsoft.Tts.UI.Controls.Trajectory.SingleTrajectoryGraph)(target));
     return;
     case 2:
     this._frameline = ((Microsoft.Tts.UI.Controls.Trajectory.TrajectoryFrameline)(target));
     return;
     case 3:
     this._hightlighFrames = ((Microsoft.Tts.UI.Controls.Trajectory.TrajectoryHighlightFrame)(target));
     return;
     case 4:
     this._meanGraph = ((Microsoft.Tts.UI.Controls.Trajectory.IntervalConstantGraph)(target));
     return;
     case 5:
     this._auxiliaryParameterGraph = ((Microsoft.Tts.UI.Controls.Trajectory.IntervalLinerGraph)(target));
     return;
     case 6:
     this._parameterGraph = ((Microsoft.Tts.UI.Controls.Trajectory.IntervalLinerGraph)(target));
     return;
     }
     this._contentLoaded = true;
 }
        /// <summary>
        /// Create trajectories.
        /// </summary>
        public void CreateTrajectories()
        {
            _trajectoryGrid.Children.Clear();
            _parameterGraphs.Clear();
            _auxiliaryParameterGraphs.Clear();
            _meanGraphs.Clear();
            _trajectoryData.LinkAxis();

            foreach (VisualSingleTrajectory traj in _trajectoryData.Trajectories)
            {
                VisualLinerSamples visualLinerSamples = new VisualLinerSamples();
                visualLinerSamples.TimeAxis = traj.TimeAxis;
                visualLinerSamples.YAxis = traj.YAxis;
                visualLinerSamples.Samples = traj.GeneratedParameters;
                IntervalLinerGraph paraGraph = new IntervalLinerGraph();
                paraGraph.CurveStroke = parameterTrajectoryStroke.Brush;
                paraGraph.CurveStrokeThickness = parameterTrajectoryStroke.Thickness;
                paraGraph.Lowerbound = IntervalLinerGraph.DefaultLowerBound;
                paraGraph.Upperbound = IntervalLinerGraph.DefaultUpperBound;
                paraGraph.SetDataContext(visualLinerSamples);

                visualLinerSamples = new VisualLinerSamples();
                visualLinerSamples.TimeAxis = traj.TimeAxis;
                visualLinerSamples.YAxis = traj.YAxis;
                visualLinerSamples.Samples = traj.AuxiliaryParameters;
                IntervalLinerGraph auxiliaryGraph = new IntervalLinerGraph();
                auxiliaryGraph.CurveStroke = auxiliaryParameterTrajectoryStroke.Brush;
                auxiliaryGraph.CurveStrokeThickness = parameterTrajectoryStroke.Thickness;
                auxiliaryGraph.Lowerbound = IntervalLinerGraph.DefaultLowerBound;
                auxiliaryGraph.Upperbound = IntervalLinerGraph.DefaultUpperBound;
                auxiliaryGraph.SetDataContext(visualLinerSamples);

                VisualConstantSamples visualConstantSamples = new VisualConstantSamples();
                visualConstantSamples.TimeAxis = traj.TimeAxis;
                visualConstantSamples.YAxis = traj.YAxis;
                visualConstantSamples.Samples = traj.Means;
                visualConstantSamples.Deviations = traj.StandardDeviations;
                IntervalConstantGraph meanGraph = new IntervalConstantGraph();
                meanGraph.Lowerbound = IntervalConstantGraph.DefaultLowerBound;
                meanGraph.Upperbound = IntervalConstantGraph.DefaultUpperBound;
                meanGraph.SetDataContext(visualConstantSamples);

                Binding binding = new Binding("ActualWidth");
                binding.Source = _graphSystem;
                paraGraph.SetBinding(IntervalLinerGraph.WidthProperty, binding);
                auxiliaryGraph.SetBinding(IntervalLinerGraph.WidthProperty, binding);
                meanGraph.SetBinding(IntervalConstantGraph.WidthProperty, binding);
                binding = new Binding("ActualHeight");
                binding.Source = _graphSystem;
                paraGraph.SetBinding(IntervalLinerGraph.HeightProperty, binding);
                auxiliaryGraph.SetBinding(IntervalLinerGraph.HeightProperty, binding);
                meanGraph.SetBinding(IntervalConstantGraph.HeightProperty, binding);

                _parameterGraphs.Add(paraGraph);
                _auxiliaryParameterGraphs.Add(auxiliaryGraph);
                _meanGraphs.Add(meanGraph);
            }

            if (_dimensionGraphData.DisplayController.TrajectoryDisplayController.ModelDataShowed)
            {
                foreach (IntervalConstantGraph graph in _meanGraphs)
                {
                    _trajectoryGrid.Children.Add(graph);
                }
            }

            if (_dimensionGraphData.DisplayController.TrajectoryDisplayController.TrajectoryShowed)
            {
                foreach (IntervalLinerGraph graph in _parameterGraphs)
                {
                    _trajectoryGrid.Children.Add(graph);
                }
            }

            if (_dimensionGraphData.DisplayController.AuxiliaryTrajectoryEnabled &&
                _dimensionGraphData.DisplayController.TrajectoryDisplayController.AuxiliaryTrajectoryShowed)
            {
                foreach (IntervalLinerGraph graph in _auxiliaryParameterGraphs)
                {
                    _trajectoryGrid.Children.Add(graph);
                }
            }
        }