PathPresenter, File type item

This commit is contained in:
2022-05-16 22:12:21 +02:00
parent 836c39c80c
commit becca2b62f
7 changed files with 73 additions and 9 deletions

View File

@@ -0,0 +1,18 @@
using System.Globalization;
using Avalonia.Data.Converters;
namespace FileTime.GuiApp.Converters;
public class StringReplaceConverter : IValueConverter
{
public string? OldValue { get; set; }
public string? NewValue { get; set; }
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
=> value is string s && OldValue != null && NewValue != null ? s.Replace(OldValue, NewValue) : value;
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}