当autosize为 false时如何禁用以下转换器。我应该在什么都不做的地方放什么代码。
[ValueConversion(typeof(Boolean), typeof(Double))]
public class ConvertAutoSize2HeightWidth : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
Boolean autosize = (Boolean)value;
if (autosize)
return Double.NaN;
else
//**do nothing**
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}