26 lines
694 B
C#
26 lines
694 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Globalization;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
using System.Windows;
|
|||
|
using System.Windows.Data;
|
|||
|
|
|||
|
namespace DM_Weight.Converter
|
|||
|
{
|
|||
|
internal class TakeQuantityEnabelConverter : IValueConverter
|
|||
|
{
|
|||
|
//-1未绑定
|
|||
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|||
|
{
|
|||
|
return (int)value == -1 ? Visibility.Collapsed : Visibility.Visible;
|
|||
|
}
|
|||
|
|
|||
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|||
|
{
|
|||
|
return Binding.DoNothing;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|