feat: add Gap property to Avatar.

This commit is contained in:
Zhang Dian
2025-01-14 21:28:41 +08:00
parent dae550ece7
commit e57036163d
4 changed files with 42 additions and 12 deletions

View File

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