Preparing a photo album with captions
The FlipView
control allows you not only to present images defined declaratively in XAML, but also to use the data binding mechanism, as well as enhance the appearance using item templates. In this recipe, you will learn how to prepare an improved version of a photo album with captions.
Getting ready
To step through this recipe, you only need the automatically generated project.
How to do it...
To prepare the improved version of the photo album, where each picture is enhanced with a caption, perform the following steps:
- Install the
PropertyChanged.Fody
library using the NuGet Package Manager. Do not forget to add theFodyWeavers.xml
file, as already explained in the Creating the view model for a page recipe in Chapter 3, MVVM and Data Binding. - Add the
01.jpg
,02.jpg
,03.jpg
, and04.jpg
files to theAssets
directory. - Define the
PhotoViewModel
class, representing the data of a single photo shown in the user interface, in thePhotoViewModel.cs
file in the...