功能完善

This commit is contained in:
ShrlAlgo
2025-08-20 12:10:13 +08:00
parent d0cfc64450
commit fcd306b0f7
270 changed files with 11503 additions and 7193 deletions

View File

@@ -0,0 +1,26 @@
using System.Globalization;
using System.Windows.Data;
namespace NeumUI.Converters.Internal;
/// <summary>
///
/// </summary>
[ValueConversion(typeof(double), typeof(Thickness))]
internal class IntensityToSlotMarginConverter : IValueConverter
{
public static readonly IntensityToSlotMarginConverter Instance = new();
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
var intensity = (double)(value ?? 0);
//边距越小,留下的边框越窄
var uniformValue = 4 * intensity + 4;
return new Thickness(uniformValue);
}
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
return Binding.DoNothing;
}
}