My datasource for this app is a Sqlite DB. It all works pretty fine except of one point.
I want to fill an item grid with data from that DB and use the pictures stored in that db as background images.
public class Movie_Picture
{
[SQLite.AutoIncrement, SQLite.PrimaryKey]
public int id { get; set; }
public byte[] Picture { get; set; }
public int Movie_id { get; set; }
}
If I query this table with
var query = connection.QueryAsync<Movie_Picture>("Select * from Movie_Picture");
i can fill the item grid and each item in that grid gets his label from Movie_id and id but the images aren´t displayed
The XAML for this grid looks like
<GridView x:Name="DataGrid1" SelectionChanged="DataGrid1_SelectionChanged" ItemsSource="{Binding}">
<GridView.ItemTemplate>
<DataTemplate>
<Grid Width="300" Height="300" removed="{x:Null}">
<TextBlock Text="{Binding id}" Margin="0,140,0,0"></TextBlock>
<TextBlock Text="{Binding Movie_id}" Margin="0,180,0,0"></TextBlock>
<Image x:Name="itemImage" Source="{Binding Picture, Converter={StaticResource BytesToImageConverter}}" />
</Grid>
</DataTemplate>
</GridView.ItemTemplate>
</GridView>
Any help would be appriciated.