예제 #1
0
 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;
 }
예제 #2
0
 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);
 }
예제 #3
0
 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;
 }
예제 #4
0
        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);
        }
예제 #5
0
        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);
        }
예제 #6
0
        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);
        }
예제 #7
0
 public AdornerService(Artboard artboard)
 {
     this.artboard = artboard;
 }
예제 #8
0
 public SnapToGridRenderer(Artboard artboard)
 {
     this.artboard = artboard;
 }