This commit is contained in:
ShrlAlgo
2025-08-20 12:10:35 +08:00
parent fcd306b0f7
commit 955a01f564
962 changed files with 7893 additions and 127784 deletions

View File

@@ -1,15 +1,17 @@
using System.Globalization;
using System.Windows.Data;
using NeoUI.Controls;
namespace NeoUI.Controls;
namespace NeoUI.Converters.Internal;
/// <summary>
/// 将色相值转换为画刷的转换器。此转换器实现了IValueConverter接口用于在绑定过程中将int类型的色相值转换成相应的SolidColorBrush。
/// 转换方法使用HsvToRgb静态方法来根据给定的色相、饱和度固定为1.0和亮度固定为1.0生成颜色并创建一个SolidColorBrush实例。
/// 如果输入值不是int类型则返回一个透明的画刷。
/// </summary>
public class HueToBrushConverter : IValueConverter
internal class HueToBrushConverter : IValueConverter
{
public static HueToBrushConverter Instance { get; set; }= new();
/// <summary>
/// 将色相值转换为画刷的方法。此方法实现了IValueConverter接口中的Convert方法用于在数据绑定过程中将int类型的色相值转换成相应的SolidColorBrush。
/// 如果输入值是int类型则根据给定的色相、饱和度固定为1.0和亮度固定为1.0生成颜色并创建一个SolidColorBrush实例。如果输入值不是int类型则返回一个透明的画刷。