Пример #1
0
        private static void OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            Viewport2D viewport = (Viewport2D)d;

            viewport.UpdateTransform();
            viewport.RaisePropertyChangedEvent(e);
        }
Пример #2
0
		private static void OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
		{
      if (e.Property.Name == "Output") {
        var rectArray = new Rect[] { (Rect)e.NewValue , (Rect)e.OldValue };
        if (!rectArray.Except(_rectArray).Any()) return;
        _rectArray = rectArray;
      }
			Viewport2D viewport = (Viewport2D)d;
			viewport.UpdateTransform();
			viewport.RaisePropertyChangedEvent(e);
		}
Пример #3
0
        private static void OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            Viewport2D viewport = (Viewport2D)d;

            // This counter is a part of workaround for endless axis resize loop
            // If internal update count exceeds threshold stop enoforcing restrictions
            if (e.Property == VisibleProperty)
            {
                if (viewport.UpdateIterationCount++ > 8)
                {
                    viewport.EnforceRestrictions = false;
                    Debug.WriteLine("Plotter: update cycle detected. Viewport constraints disabled.");
                }
            }
            viewport.UpdateTransform();
            viewport.RaisePropertyChangedEvent(e);
        }