Files
GhostEngine/Ghost.Editor/Utilities/Converters/GetDirectoryNameConverter .cs
2025-10-05 16:26:37 +09:00

16 lines
492 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();
}
}