Пример #1
0
        public LineGraph( LineGraphViewModel vm )
        {
            InitializeComponent();
            RenderTransform = new CompositeTransform();
            DataContext = vm;
            vm.TimeSeries.CollectionChanged += OnTimeSeriesChanged;
            ManipulationMode = ManipulationModes.All;
            ManipulationStarting += OnManipulationStarting;
            ManipulationDelta += OnManipulationDelta;

            Loaded += delegate(object sender, RoutedEventArgs args)
            {
                xBtnCluster.PointerReleased += OnBtnClusterReleased;
                xBtnNormalize.PointerReleased += OnBtnNormalizeReleased;
                xInqCanvas.StrokeColor = Colors.White;
                xInqCanvas.StrokeAdded += OnStrokeAdded;
            };
        }
Пример #2
0
 public LineGraph CreateLineGraph(List<TimeSeries> ts)
 {
     var lvm = new LineGraphViewModel(ts);
     var graph = new LineGraph(lvm);
     graph.Update();
     return graph;
 }