更新整理

This commit is contained in:
GG Z
2025-04-24 20:56:44 +08:00
parent 155cef46f8
commit 5b6d67b571
813 changed files with 14437 additions and 12362 deletions

View File

@@ -1,20 +1,22 @@
using WPFluent.Extensions;
using WPFluent.Models;
using System;
using System.Windows.Data;
using WPFluent.Controls;
using WPFluent.Extensions;
namespace WPFluent.Converters;
/// <summary>
/// Converts HSB color values to SolidColorBrush and vice versa. Supports single and multi-value conversions.
/// </summary>
public class HsbToColorConverter : IValueConverter, IMultiValueConverter
internal class HsbToColorConverter : IValueConverter, IMultiValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if(value is Hsb hsb)
if (value is Hsb hsb)
return new SolidColorBrush(hsb.ToColor());
return Binding.DoNothing;
}
@@ -29,7 +31,7 @@ public class HsbToColorConverter : IValueConverter, IMultiValueConverter
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
if(value is SolidColorBrush brush)
if (value is SolidColorBrush brush)
return brush.Color.ToHsb();
return Binding.DoNothing;
}