2025-02-10 20:53:40 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Windows.Data;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace WPFluent.Converters;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 判断值是否为空
|
|
|
|
|
|
/// </summary>
|
2025-04-24 20:56:44 +08:00
|
|
|
|
internal class StringIsEmptyConverter : IValueConverter
|
2025-02-10 20:53:40 +08:00
|
|
|
|
{
|
|
|
|
|
|
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
|
|
|
|
|
{ return string.IsNullOrEmpty(System.Convert.ToString(value)); }
|
|
|
|
|
|
|
2025-05-05 17:04:06 +08:00
|
|
|
|
public object? ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
2025-02-10 20:53:40 +08:00
|
|
|
|
{ return null; }
|
|
|
|
|
|
}
|