4 using System.Globalization;
6 using SiliconStudio.Core.IO;
8 namespace SiliconStudio.Presentation.ValueConverters
17 public override object Convert(
object value, Type targetType,
object parameter, CultureInfo culture)
19 return value != null ? value.ToString().Replace(
"/",
"\\") : null;
23 public override object ConvertBack(
object value, Type targetType,
object parameter, CultureInfo culture)
25 if (targetType == typeof(
UFile))
26 return value != null ?
new UFile((
string)value) : null;
29 return value != null ?
new UDirectory((
string)value) : null;
31 throw new ArgumentException(
@"target type must be either UFile or UDirectory",
"targetType");
override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
override object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
This converter will convert an UPath object to its string representation. ConvertBack is supported...
Defines a normalized directory path. See UPath for details. This class cannot be inherited.
Defines a normalized file path. See UPath for details. This class cannot be inherited.