I am trying to add some images to a FlipView using the following code:
for (int N = 1; N < 30; N++)
{
string name = String.Format(@"ms-appx:/Gallery/{0:00}.jpg", N);
Uri uri = new Uri(name);
BitmapImage img = new BitmapImage(uri);
MainFlipView.Items.Add(img);
}
but it only displays some texts. I defined the FlipView in my XAML:
<FlipView x:Name="MainFlipView">
</FlipView>
What should I do?
The text showing is a call to the ToString method of the BitmapImage because you have no DataTemplate defined. Define on: