Пример #1
0
 public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
     if (formatter == null || formatterName != (string)parameter)
     {
         formatterName = (string)parameter;
         formatter     = Formatters.GetDefault(formatterName);
     }
     return(formatter.Format(value));
 }
Пример #2
0
 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
     return(formatter.Format(value));
 }