public ChartPlotter3D() { _dataPointTip = new ModelVisual3D(); _axisGrid = new AxisGrid(); NumericTicksProvider numericProvider = new NumericTicksProvider(6, 4, 0.15, 0.1); numericProvider.LabelStringFormat = "{0:0.00}"; _axisGrid.TicksProvider = numericProvider; _axisFrame = new AxisFrame(); _axisFrame.AxisLength = _axisGrid.AxisLength; _curveModel = new Surface3D(); _curveModel.SetValue(FrameworkElement.NameProperty, "CurveVisual"); _wireFrame = new SurfaceWireframe(); _wireFrame.Thickness = 1.2; _wireFrame.DepthOffset = 1E-05; _pntsModel = new Surface3DPoints(); _mesh3D = new SurfaceMesh3D(); _mesh3D.DepthOffset = 1E-05; base.CommandBindings.Add(new CommandBinding(ChartPlotter3D.ZoomCommand, new ExecutedRoutedEventHandler(this.OnMenuZoomCommand))); base.CommandBindings.Add(new CommandBinding(ChartPlotter3D.NormalCommand, new ExecutedRoutedEventHandler(this.OnMenuNormalCommand))); base.CommandBindings.Add(new CommandBinding(ChartPlotter3D.DataCursorCommand, new ExecutedRoutedEventHandler(this.OnMenuDataCursorCommand))); base.CommandBindings.Add(new CommandBinding(ChartPlotter3D.PanCommand, new ExecutedRoutedEventHandler(this.OnPanCommand))); base.CommandBindings.Add(new CommandBinding(ChartPlotter3D.ViewXYZCommand, new ExecutedRoutedEventHandler(this.OnViewXYZCommand))); base.CommandBindings.Add(new CommandBinding(ChartPlotter3D.ResetViewCommand, new ExecutedRoutedEventHandler(this.OnResetViewCommand))); base.CommandBindings.Add(new CommandBinding(ChartPlotter3D.MeshViewCommand, new ExecutedRoutedEventHandler(this.OnMeshViewCommand))); base.Loaded += new RoutedEventHandler(this.ChartPlotter3D_Loaded); }
protected static void PropertyChanged(object sender, DependencyPropertyChangedEventArgs e) { AxisGrid axisGrid = (AxisGrid)sender; axisGrid.Reset(); }