功能更新

This commit is contained in:
GG Z
2026-02-12 21:29:00 +08:00
parent a9faf251be
commit 5f1adc5ad2
341 changed files with 4293 additions and 1874 deletions

View File

@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace Melskin.Converters.Internal
{
/// <summary>
/// 数字转换为圆角转换器
/// </summary>
public class DoubleToCornerRadiusConverter : IValueConverter
{
/// <summary>
/// 单例
/// </summary>
public static readonly DoubleToCornerRadiusConverter Instance = new();
/// <inheritdoc />
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (double.TryParse(value?.ToString(),out double result))
{
return new CornerRadius(result);
}
return new CornerRadius();
}
/// <inheritdoc />
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}