Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- return ((TimeSpan)value).TotalSeconds.ToString(CultureInfo.InvariantCulture);
- }
- /// <see cref="IValueConverter.ConvertBack"/>
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- return TimeSpan.FromSeconds(int.Parse((string) value, NumberStyles.None, CultureInfo.InvariantCulture));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement