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 | System | The culture to use in the converter. |
return | object |
public void Null_Converts_To_Detected_AppIcon() { var conv = new AppIconImageConverter(); var result = conv.Convert(null, typeof(ImageSource), null, CultureInfo.CurrentCulture); Assert.AreSame(AppIconImageConverter.AppIcon, result); }
public void Not_Null_Converts_To_Input() { var conv = new AppIconImageConverter(); // an 8x3 bw image var input = BitmapSource.Create(8, 3, 96, 96, PixelFormats.BlackWhite, BitmapPalettes.BlackAndWhite, new byte[] { 0, 255, 0 }, 1); var result = conv.Convert(input, typeof(ImageSource), "not", CultureInfo.CurrentCulture); Assert.AreSame(input, result); }