Exemplo n.º 1
0
        private static object ConstrainScaleToRange(DependencyObject d, object value)
        {
            NodifyEditor editor = (NodifyEditor)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);
        }
Exemplo n.º 2
0
 public SelectionHelper(NodifyEditor host)
 => _host = host;