<syncFusion:SfMosaicTile Width="173" Height="171" Header="{Binding Name}" ImageList="{Binding Icons}" > </syncFusion:SfMosaicTile>
<syncFusion:SfMosaicTile Width="173" Height="171" Header="{Binding Name}" > <syncFusion:SfMosaicTile.ImageList> <syncFusion:ImageList> <x:String>ms-appdata:///local/M_Photos_WP_20131117_15_05_41_Refocus.jpg</x:String> </syncFusion:ImageList> </syncFusion:SfMosaicTile.ImageList> </syncFusion:SfMosaicTile>
Hi Cristovao,
We have prepared a sample to address your requirement 'To bind image list for SfMosaicTile'. In the sample we have created a property of type 'ImageList' and binded the list to it.Please find the sample in below attachment.
Please let us know if you have any queries.
Regards,
Vignesh V
<syncFusion:SfMosaicTile Width="173" Height="171" Header="{Binding Name}" ImageList="{Binding Converter={StaticResource ListToImageListConverter}}" />
public sealed class ListToImageListConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, string language) { ImageList list = new ImageList(); var i = (Domain.Models.Ui.Item)value; if (i.IsFolder) { List<string> images = i.Icons; Debug.WriteLine(i.Path); int max = 0; if (images != null && images.Count > 0) foreach (var item in images) { list.Add(item); max++; if (max > 8) break; } else list.Add("ms-appdata:///local/default.jpg");
} else { list.Add("ms-appdata:///local/default.jpg"); } return list; } public object ConvertBack(object value, Type targetType, object parameter, string language) { return !(value is bool && (bool)value); }
Hi Cristovao,
Thank you for your update. Please let us know if you need further assistance.
Regards,
Vignesh V
Hi Cristovao,
Thank you for your update. Please let us know if you need further assistance.
Regards,
Vignesh V
Hi Manuel,
We have prepared a workaround sample which tries to meet your requirement. In this sample we have created a property of type 'ObservableCollection<Image>' and binded the image collection to ImageList property of SfMosaicTile control. We have used IValuConverter to convert from Image observable collection to ImageList collection. If your requirement is different from this sample, please provide more information about your requirement. It would be very helpful for us to resolve your problem earlier.
Please download the sample from the below link.
Sample link: MossaicTile_115900
Please let us know if you need further assistance.
Regards,
Mariappan S.
<Notification:ImageList>
<x:String>C:\\Users\\Manny\\Pictures\\DSC_0411.jpg</x:String>
</Notification:ImageList>
Please help.