Chapter 7. Employing Media and Web Elements

,

In This Chapter

Image Using the Image element

Image Capturing and displaying user input with the InkPresenter

Image Playing audio and video with the MediaElement

Image Using the XNA SoundEffect class

Image Configuring the XNA game loop

Image Using the MediaLibrary to add music tracks to the Music+Videos Hub

Image Using the Deep Zoom Composer

Image Using touch gestures to manipulate a MultiScaleImage

Image Communicating to and from a web page using the WebBrowser control

Image Executing arbitrary JavaScript on a web page with InvokeScript

Image Storing and viewing offline web content with the WebBrowser control


The Windows Phone SDK provides a mature set of web and media-related elements. This chapter explores some of the most feature-rich controls present in the XAML toolbox.

This chapter is jam-packed full of examples and begins by looking in depth at the Image element. The InkPresenter is discussed, and you see how to create a simple sketch app.

The MediaElement is also discussed and you see how it is used to play audio and video files stored locally on the phone, or streamed over the Internet. This chapter also examines a sample app that provides you with a test bed for experimenting with the MediaElement’s main properties.

The chapter looks at leveraging XNA within your XAML-based app to play sound effects more efficiently and at using the new Windows Phone 8 Media Library extensions to add or remove music tracks to and from the Music+Videos Hub. It then explores Deep Zoom to see how the MultiScaleImage element is used to provide stunning visual experiences while making efficient use of your users’ bandwidth. We delve into a sample client and server application that allows the user to select and manipulate a Deep Zoom image.

Finally, the chapter explores the WebBrowser control, and you see how to communicate to a web page from your Windows Phone app and vice versa. You also discover how to execute arbitrary JavaScript on a web page to modify CSS styles or to attach new behaviors, and how to store and browse offline content to decrease network usage.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.35.178