public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
 {
     try
     {
         return(CoordinatesConverter.HMSToDecimal(value as string));
     }
     catch (Exception)
     {
         return(null);
     }
 }
 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
     try
     {
         return(CoordinatesConverter.DecimalToHMS(System.Convert.ToDouble(value)));
     }
     catch (Exception)
     {
         return(Binding.DoNothing);
     }
 }
 public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
 {
     try
     {
         var dec = System.Convert.ToString(value);
         return(CoordinatesConverter.DMSToDecimal(dec));
     }
     catch (Exception)
     {
         return(null);
     }
 }