Let's say I have the following dummy class:
public class Foo
{
public Image MyImage
{
get;
set;
}
}
and I have the following in some XAML
<Image Source="{Binding Foo.MyImage}"/>
If I understand this correctly, this doesn't work because Source is expecting a URI string value for where MyImage is stored but in this case there is no URI because MyImage is in memory.
How can I get the above to work?
EDIT:
This is how MyImage is being created:
private void CreateBarCode(string bcValue)
{
Code128 bc128 = new Code128();
bc128.HumanReadable = Code128.TextWhere.Below;
this.MyImage = new Bitmap(bc128.Generate(bcValue));
}
Via a method which takes a string value and returns a barcode which is in Bitmap format.