Here is what I wanted to do . I have created an ImageList in XAML code
<local:CollectionFlow x:Name="ImageList" ItemTemplate="{StaticResource DataTemplate1}"
ItemsPanel="{StaticResource ItemsPanelTemplate1}"/>
<Image Source="Images/imgBack.png" Width="48" Height="48" HorizontalAlignment="Left"
VerticalAlignment="Center" Margin="15,0,0,0" MouseLeftButtonDown="Left"/>
<Image Source="Images/imgfORWARD.png" Width="48" Height="48" HorizontalAlignment="Right"
VerticalAlignment="Center" Margin="0,0,15,0" MouseLeftButtonDown="Right" />`
Now I m trying to populate the above list using pictures from MediaLibrary like this
ImageList.ItemsSource = mediaLib.Pictures;
I cannot see the pictures from mediaLibrary. Is there something I'm doing wrong . Previously I populated the list using static values like below which works.
ImageList.ItemsSource = new string[] { "SampleImages/1.png", "SampleImages/2.png", "SampleImages/3.png", "SampleImages/4.png", "SampleImages/5.png", "SampleImages/6.png", "SampleImages/7.png", "SampleImages/8.png", "SampleImages/9.png", "SampleImages/10.png", "SampleImages/11.png", "SampleImages/12.png" };
A PictureCollection
is not just an array of strings it is an enumerable of Picture
objects.
Also note that you cannot get the path to images in the medialibrary only streams.