internal void TearDown() { this.sceneView.ViewModel.AnimationEditor.RecordModeChanged -= new EventHandler(this.AnimationEditor_RecordModeChanged); this.sceneView.ViewModel.LateSceneUpdatePhase -= new SceneUpdatePhaseEventHandler(this.ViewModel_LateSceneUpdate); this.artboard.ZoomChanged -= new EventHandler(this.Artboard_ZoomChanged); this.artboard.CenterChanged -= new EventHandler(this.Artboard_CenterChanged); this.artboard.SnapToGridRenderer.Detach(); if (this.sceneView.ViewModel.DesignerContext != null) { AnnotationService annotationService = this.sceneView.DesignerContext.AnnotationService; if (annotationService != null) { annotationService.ShowAnnotationsChanged -= new EventHandler(this.AnnotationService_ShowAnnotationsChanged); annotationService.AnnotationsEnabledChanged -= new EventHandler(this.AnnotationService_AnnotationsEnabledChanged); } } if (this.sceneView.ViewModel.DesignerContext.SnappingEngine != null) { this.sceneView.ViewModel.DesignerContext.ArtboardOptionsChanged -= new EventHandler(this.OnArtboardOptionsChanged); } if (this.sceneView.ViewModel.DesignerContext.WindowService != null) { this.sceneView.ViewModel.DesignerContext.WindowService.ThemeChanged -= new EventHandler(this.WindowManager_ThemeChanged); } this.LayoutUpdated -= new EventHandler(this.SceneScrollViewer_LayoutUpdated); this.horizontalScrollBar.ValueChanged -= new RoutedPropertyChangedEventHandler <double>(this.HorizontalScrollBar_ValueChanged); this.verticalScrollBar.ValueChanged -= new RoutedPropertyChangedEventHandler <double>(this.VerticalScrollBar_ValueChanged); this.horizontalScrollBar = (ExtendedScrollBar)null; this.verticalScrollBar = (ExtendedScrollBar)null; this.artboard.TearDown(); this.artboard = (Artboard)null; this.Child = (UIElement)null; this.sceneView = (SceneView)null; }
public SceneScrollViewer(SceneView sceneView, Artboard artboard) { this.sceneView = sceneView; this.sceneView.ViewModel.AnimationEditor.RecordModeChanged += new EventHandler(this.AnimationEditor_RecordModeChanged); this.artboard = artboard; this.CreateComponents(); this.LayoutUpdated += new EventHandler(this.SceneScrollViewer_LayoutUpdated); }
public void Detach() { if (this.designerContext == null) { return; } this.LayoutUpdated -= new EventHandler(this.OnLayoutUpdated); this.designerContext.ArtboardOptionsChanged -= new EventHandler(this.OnArtboardOptionsChanged); this.designerContext = (DesignerContext)null; this.artboard = (Artboard)null; }
private static object ZoomPropertyCoerceValue(DependencyObject dependencyObject, object baseValue) { Artboard artboard = (Artboard)dependencyObject; double val1 = (double)baseValue; if (artboard.zoomPresetCollection != null) { val1 = Math.Max(artboard.zoomPresetCollection.Minimum, Math.Min(val1, artboard.zoomPresetCollection.Maximum)); } return((object)val1); }
private static void CenterPropertyChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e) { Artboard artboard = (Artboard)dependencyObject; artboard.UpdateChildren(); if (artboard.CenterChanged == null) { return; } artboard.CenterChanged((object)artboard, EventArgs.Empty); }
private static void ZoomPropertyChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e) { PerformanceUtility.MeasurePerformanceUntilRender(PerformanceEvent.AdjustZoom); Artboard artboard = (Artboard)dependencyObject; artboard.UpdateChildren(); if (artboard.ZoomChanged == null) { return; } artboard.ZoomChanged((object)artboard, EventArgs.Empty); }
public AdornerService(Artboard artboard) { this.artboard = artboard; }
public SnapToGridRenderer(Artboard artboard) { this.artboard = artboard; }