feat: Clip.

This commit is contained in:
Zhang Dian
2024-06-19 13:44:10 +08:00
parent 0cd2e41bec
commit 83c4e07579
3 changed files with 38 additions and 3 deletions

View File

@@ -0,0 +1,22 @@
using System.Globalization;
using Avalonia.Data.Converters;
namespace Ursa.Converters;
public class DivideByTwoConverter : IValueConverter
{
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value is double d)
{
return d / 2;
}
return value;
}
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}