PathPresenter, File type item
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user