/// <summary>
 /// Set data.
 /// </summary>
 /// <param name="data">Graph data.</param>
 /// <param name="parent">Parent graph.</param>
 public void SetData(VisualDimensionGraph data, IMultiFrameControler parent)
 {
     Debug.Assert(data != null && parent != null);
     _graphData = data;
     _parent = parent;
     Debug.Assert(data.StaticTrajectory is VisualMultiTrajectory);
     _trajectoryData = data.StaticTrajectory as VisualMultiTrajectory;
 }
        /// <summary>
        /// Set data context.
        /// </summary>
        /// <param name="graphData">Graph data.</param>
        /// <param name="trajectoryData">Trajectory data.</param>
        /// <param name="hoverFrameIndexes">Hover frame indexes.</param>
        public void SetDataContext(VisualDimensionGraph graphData,
            VisualMultiTrajectory trajectoryData,
            ObservableCollection<int> hoverFrameIndexes)
        {
            Debug.Assert(graphData != null && trajectoryData != null,
                "Can't set null data context to MultiTrajectoryGraph.");

            _dimensionGraphData = graphData;
            DataContext = _dimensionGraphData;

            _dimensionGraphData.DisplayController.PropertyChanged +=
                new PropertyChangedEventHandler(OnGraphVisibilityChanged);

            _frameline.TimeAxis = graphData.TimeAxis;
            _selectedFrames.TimeAxis = graphData.TimeAxis;
            _selectedFrames.HighlightFrames = graphData.SelectedFrameIndexes;
            _selectedMultiFrames.TimeAxis = graphData.TimeAxis;
            _hightlighFrames.TimeAxis = graphData.TimeAxis;
            _hightlighFrames.HighlightFrames = hoverFrameIndexes;
            _hoverFrameIndexes = hoverFrameIndexes;
            _trajectoryData = trajectoryData;
        }