public override object Convert(object value, Type targetType, object parameter, CultureInfo culture) { return(converter.Convert(value, targetType, parameter, culture)); }
public override object Convert(object value, [AllowNull] Type targetType, [AllowNull] object parameter, [AllowNull] CultureInfo culture) { return(converter.Convert(value, targetType, parameter, culture)); }
public void DefaultValues(bool?visible) { var converter = (IValueConverter) new BooleanToVisibilityConverter(); var systemConverter = new System.Windows.Controls.BooleanToVisibilityConverter(); var convert = converter.Convert(visible, null, null, null); var sysConvert = systemConverter.Convert(visible, null, null, null); Assert.AreEqual(convert, sysConvert); var convertBack = converter.ConvertBack(convert, null, null, null); var sysConvertBack = systemConverter.ConvertBack(sysConvert, null, null, null); Assert.AreEqual(convertBack, sysConvertBack); }
public static Visibility ConvertToVisibility(bool v) { return((Visibility)bool2Vis.Convert(v, null, null, null)); }
public override object Convert(object value, Type targetType, object parameter, CultureInfo culture) { var offset = (double)value; return(converter.Convert(offset > 0.0, targetType, parameter, culture)); }