public Convert ( object value, |
||
value | object | The value produced by the binding source. |
targetType | The type of the binding target property. | |
parameter | object | The converter parameter to use. |
culture | The culture to use in the converter. | |
return | object |
public void ConvertWithNullReturnsCollapsed() { var converter = new StringToVisibilityConverter(); var value = converter.Convert(null, typeof(Visibility), null, CultureInfo.CurrentCulture); Assert.AreEqual(value, Visibility.Collapsed); }
public void ConvertWithNonEmptyStringReturnsVisible() { var converter = new StringToVisibilityConverter(); var value = converter.Convert(NonEmptyTestString, typeof(Visibility), null, CultureInfo.CurrentCulture); Assert.AreEqual(value, Visibility.Visible); }