MainPage.xaml
<Page
x:Class="UniversalAppTutorials.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:UniversalAppTutorials"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
>
<RelativePanel Background="MintCream">
<TextBlock
x:Name="TextBlock1"
RelativePanel.AlignBottomWithPanel="True"
RelativePanel.AlignHorizontalCenterWithPanel="True"
Margin="15"
Foreground="Blue"
FontFamily="MV Boli"
FontSize="30"
FontStyle="Italic"
/>
<FlipView
x:Name="FlipView1"
Background="Transparent"
Padding="25"
SelectionChanged="FlipView1_SelectionChanged"
>
<!-- Item 1 -->
<Viewbox MaxWidth="200" MaxHeight="200">
<SymbolIcon Symbol="BackToWindow" Foreground="Red"/>
</Viewbox>
<!-- Item 2 -->
<Viewbox MaxWidth="200" MaxHeight="200">
<SymbolIcon Symbol="Calendar" Foreground="Blue"/>
</Viewbox>
<!-- Item 3 -->
<Viewbox MaxWidth="200" MaxHeight="200">
<SymbolIcon Symbol="Directions" Foreground="Violet"/>
</Viewbox>
<!-- Item 4 -->
<Viewbox MaxWidth="200" MaxHeight="200">
<SymbolIcon Symbol="Emoji" Foreground="HotPink"/>
</Viewbox>
<!-- Item 5 -->
<Viewbox MaxWidth="200" MaxHeight="200">
<SymbolIcon Symbol="Favorite" Foreground="OrangeRed"/>
</Viewbox>
</FlipView>
</RelativePanel>
</Page>
MainPage.xaml.cs
using Windows.UI.Xaml.Controls;
namespace UniversalAppTutorials
{
public sealed partial class MainPage : Page
{
public MainPage()
{
this.InitializeComponent();
}
private void FlipView1_SelectionChanged(object sender, SelectionChangedEventArgs e) {
// Get the FlipView instance
FlipView flipView = (FlipView)sender;
// Get the FlipView number of items
int items = flipView.Items.Count;
// Get the FlipView selected item position
int position = flipView.SelectedIndex + 1;
// Display the selected item position on TextBlock
TextBlock1.Text = "Item " + position + " of " + items;
}
}
}
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJjiwGXRwK6hqBCUGYypAHUt3on09um-tOZElu_jOr8-QE7t8UKzVcZ6JccnBEGoUMT16rEaY8Dwc4Nl8PRNjRlmcaB5jgJNtUxYH0Oiwzq7k9pViqBZkftGW34rCRBUtr-GE-CAloVfA/s1600/UWPFlipViewSelectionChangedEventExample.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCp0U06mW4Kkgf_SLi4qxyAjSZ_sWa28t2njI6Ny0SO2cBLUD_2W2r9sQ6j8Zx0q20yptqRlTZCCiK0e5vMGJFurLqcyoBS8-SRWRv65ZurHW7qjF-UBumg6GSvXjgIrMk2bChBRvyRRM/s1600/UWPFlipViewSelectionChangedEventExample2.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbbPEUkUhX_nqIcnaCgZmUWPMhvnuyjaShI9je_Pg7SeA3FsHTDH4vWv_Uvpc8FAIWNmsUmZvA0aZaRZ6LwwZga9uF_L7rwKd0YgqLtgdOkhQvyJc9GAY4GyaJJu9s-GGsIX3KMn7TRAY/s1600/UWPFlipViewSelectionChangedEventExample3.png)