Reputation: 426
I can't find a clear answer on how to bind a byte array to the ImageSource of an ImageCell in an ListView.
<ListView x:Name="listEntries" ItemsSource="{Binding Entries}">
<ListView.ItemTemplate>
<DataTemplate>
<ImageCell
Text="{Binding Barcode}"
ImageSource="{Binding Image}"
>
</ImageCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
I realy have no idea how to make this work.
Upvotes: 4
Views: 3470
Reputation: 426
Oke, I found the solution.. I took it way to far, because of the examples/same problems I found online.
I changed the 'Image'-Property from String
to ImageSource
and then filled it with 'ImageSource.FromStream(() => new MemoryStream(pictureByteArray))'
And it worked!
Upvotes: 4