VPet/VPet.Solution/Converters/ConverterBase/CanInverterMultiValueConverter.cs

32 lines
768 B
C#
Raw Normal View History

2023-12-30 15:50:37 +00:00
using System.ComponentModel;
using System.Windows;
namespace HKW.WPF.Converters;
/// <summary>
/// 可反转值转换器
/// </summary>
public abstract class CanInverterMultiValueConverter<T> : MultiValueConverterBase
where T : CanInverterMultiValueConverter<T>
{
/// <summary>
///
/// </summary>
public static readonly DependencyProperty InverterProperty = DependencyProperty.Register(
nameof(Inverter),
typeof(bool),
typeof(AllIsBoolToVisibilityConverter),
new PropertyMetadata(false)
);
/// <summary>
/// 反转
/// </summary>
[DefaultValue(false)]
public bool Inverter
{
get => (bool)GetValue(InverterProperty);
set => SetValue(InverterProperty, value);
}
}