Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

ListView (Image) Binding with Converter

$
0
0

Hello everybody,

i have a listview with a viewcell.
<ListView x:Name="listView" ItemsSource="{Binding PictureInformation}" RowHeight="130">
...
<ImageCell ImageSource="{Binding ThumbnailBytes, Converter={StaticResource ByteToImageSourceConverter}}" Text="{Binding Filename}"></ImageCell>

ThumbnailBytes is an ByteArray of my downsized Picture i want to show.

The Converter gets called and the Value is a Xamarin.Forms.Binding object with Source property = null.

If i use that binding outside of the Listview the value is an byte[] as expected.

<Image Source="{Binding TempImageBytes, Converter={StaticResource ByteToImageSourceConverter}}" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" HeightRequest="160"/>

I also wrote and boolToColor Converter, using it in Lists will allways give me a Xamarin.Forms.Binding object as value in the converter.

What am i missing? How can i pass the binding object to a converter in a listview? Thanks for your help!

EDIT: This guy has an equal problem:
http://www.widecodes.com/CmVVWVXjeW/xamarinforms-bind-listviewimagecell-imagesource-to-byte.html


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>