Files
FModel/FModel/Views/Resources/Converters/FileNameWithoutExtensionConverter.cs
Krowe Moh 7e7d6d5bc6
Some checks are pending
FModel QA Builder / build (push) Waiting to run
a bunch of stuff (#663)
Co-authored-by: Chompster86 <chompster86@gmail.com>
Co-authored-by: Asval <asval.contactme@gmail.com>
2026-03-30 22:01:59 +02:00

19 lines
637 B
C#

using System;
using System.Globalization;
using System.IO;
using System.Windows.Data;
namespace FModel.Views.Resources.Converters
{
public class FileNameWithoutExtensionConverter : IValueConverter
{
public static readonly FileNameWithoutExtensionConverter Instance = new();
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
=> value is string s ? Path.GetFileNameWithoutExtension(s) : value;
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
=> throw new NotImplementedException();
}
}