private static void UseLogarithmicChanged(DependencyObject source, DependencyPropertyChangedEventArgs e)
 {
     try
     {
         ViewScalingGaugeSimple control = source as ViewScalingGaugeSimple;
         control.updatePosition();
     }
     catch { }
 }
        private static void ImageMaxChanged(DependencyObject source, DependencyPropertyChangedEventArgs e)
        {
            ViewScalingGaugeSimple control = null;

            try
            {
                control = source as ViewScalingGaugeSimple;
                control.updatePosition();
            }
            catch
            {
                if (control != null)
                {
                    control.ImageMax = 0;
                }
            }
        }