feat: add Gap property to Avatar.
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user