Files
GhostEngine/Ghost.Editor/Utilities/Converters/GetDirectoryNameConverter .cs

16 lines
489 B
C#

using Microsoft.UI.Xaml.Data;
namespace Ghost.Editor.Utilities.Converters;
public partial class GetDirectoryNameConverter : IValueConverter
{
public object? Convert(object value, Type targetType, object parameter, string language)
{
return value is string path ? System.IO.Path.GetDirectoryName(path) : null;
}
public object? ConvertBack(object value, Type targetType, object parameter, string language)
{
throw new NotImplementedException();
}
}