Build Media App on Visual Studio and Run on Raspberry Pi:
This article allows you to build Windows 10 App with media element which can run on Raspberry Pi with Windows 10 IoT Core.
Requirements:
- Laptop or PC with Windows 10 and Visual Studio 2015 connected with internet
- Raspberry Pi 2/3 with Windows 10 IoT Core OS
- An audio jack connected towards the Raspberry Pi device.
Follow the below steps to build Windows 10 app and to deploy it on Pi:
Step 1: Start Visual Studio and go to File -> New -> Project
Select Visual C# -> Store Apps -> Windows Apps -> Blank App (Windows)
**Step – 2: **On Solution Explorer -> Reference (Right Click) -> Add Reference file -> Extensions -> Windows IoT Extensions for UWP.
**Step – 3: **Open MainPage.xaml. Under Solution Explorer, add Images and music files towards the Assets folder. Right Click on Assets -> Add -> Existing Item -> Select the images and music files
Now add following code into main GRID tag.
<MediaElement x:Name="mediaElement" HorizontalAlignment="Left" Height="100" Margin="1855,200,-35,0" VerticalAlignment="Top" Width="100" Source="Assets/nokia tune original.mp3" />
<FlipView>
<Image Source="Assets/2014-1.jpg" />
<Image Source="Assets/2014-2.jpg" />
<Image Source="Assets/2014-3.jpg" />
</FlipView>
**Step – 4: **Now right click on the solution name and goto properties
**Step – 5: **Under Application Page go for Target Version -> Change it for Windows 10 (10.0; Build 10586) – which is the version of Windows 10 IoT Core OS installed on the Raspberry Pi kit.
**Step – 6: **Goto Solution Platforms in Visual Studio and Select ARM processor
**Step – 7: **On the next column change the deployment source for Remote Machine. Here mention the address of the internet connectivity given on the Device Info screen of your Raspberry Pi device (under IP address), now click on select.
**Step – 8: **Now run the app, you can find the following output which play music on background on images as slides.