chore: complete avalonia button style.
This commit is contained in:
1 parent
8a31a48b29
commit
2f0b39773e
17 files changed
+1990
-177
No files matched your search
@@ -9,18 +9,18 @@ public class BorderCircularConverter : IMultiValueConverter
|
||||
{
|
||||
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (values.Length == 2 && values[0] is double width && values[1] is double height)
|
||||
if (values.Length != 2 || values[0] is not double width || values[1] is not double height)
|
||||
{
|
||||
if (width < double.Epsilon || height < double.Epsilon)
|
||||
{
|
||||
return new CornerRadius();
|
||||
}
|
||||
|
||||
var min = Math.Min(width, height);
|
||||
return new CornerRadius(min / 2);
|
||||
return DependencyProperty.UnsetValue;
|
||||
}
|
||||
|
||||
return DependencyProperty.UnsetValue;
|
||||
if (width < double.Epsilon || height < double.Epsilon)
|
||||
{
|
||||
return new CornerRadius();
|
||||
}
|
||||
|
||||
var min = Math.Min(width, height);
|
||||
return new CornerRadius(min / 2);
|
||||
}
|
||||
|
||||
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
|
||||
|
||||
Reference in new issue
Block a user