Esempio n. 1
0
        private static object ConstrainScaleToRange(DependencyObject d, object value)
        {
            FlowEditor editor = (FlowEditor)d;

            if (editor.DisableZooming)
            {
                return(editor.Scale);
            }

            double num     = (double)value;
            double minimum = editor.MinScale;

            if (num < minimum)
            {
                return(minimum);
            }

            double maximum = editor.MaxScale;

            if (num > maximum)
            {
                return(maximum);
            }

            return(value);
        }
Esempio n. 2
0
 public SelectionHelper(FlowEditor host)
 => _host = host;