Playing Media

You need to add a very last page for the sample application, called PlayerPage.xaml, still using the BlankPage template. This page offers a very basic media player, using the MediaElement control (which you also saw in WPF) and some buttons in the app bar. Following is the XAML code for the page:

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">    <MediaElement Name="Player1" AutoPlay="True"/></Grid><Page.BottomAppBar>    <CommandBar>        <CommandBar.PrimaryCommands>            <AppBarButton Icon="Play" Label="Play" Name="PlayButton"             Click="PlayButton_Click"/>            <AppBarButton Icon="Stop" Label="Stop" Name="StopButton"             Click="StopButton_Click"/> ...

Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.