mirror of
https://github.com/4sval/FModel.git
synced 2026-12-04 23:02:22 -06:00
Some checks are pending
FModel QA Builder / build (push) Waiting to run
Co-authored-by: Chompster86 <chompster86@gmail.com> Co-authored-by: Asval <asval.contactme@gmail.com>
19 lines
637 B
C#
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();
|
|
}
|
|
}
|