270 likes | 538 Views
APP-912T. Build data-driven collection and list apps using XAML. Laurence Moroney Senior Program Manager Microsoft Corporation. Great apps are connected and alive with content and activity. Related sessions. [APP-737T] Metro Style Apps in XAML: What you need to know
E N D
APP-912T Build data-driven collection and list apps using XAML Laurence Moroney Senior Program Manager Microsoft Corporation
Great apps are connected and alive with content and activity.
Related sessions • [APP-737T] Metro Style Apps in XAML: What you need to know • [APP-503T] Make great touch apps using XAML • [APP-517T] Build polished collection and list apps using XAML
Agenda • What’s new and different for XAML developers in Windows 8 • Connecting to services to get data • Asynchronous patterns • Local data • How to format your data for Windows 8 controls You’ll leave with examples of how to • Connect to web and local data • Use data in Windows 8 Metro style apps
Demo Bing related image browser
Acquiring data– What’s new and different? • Relational database access through a service tier • Local app storage • App has its own storage directory • Can access local file system
Acquiring data– What’s new and different? • Use • XML-over-HTTP • JSON-over-HTTP • ASMX Web Services • Sockets • oData
Acquiring data– What’s new and different? • Asynchronous retrieval of web data using the new ‘await’ patterns • Doesn’t block the UI thread! • Doesn’t require Dispatcher.BeginInvoke(() => DoSomething);
demo Using the async ‘await’ pattern to get XML-over-HTTP data
Using data • So you’ve downloaded data asynchronously, now what? • Your familiar LINQ skills still apply • Binding to controls • ListBox • GridView • Grouping in GridView controls • Using IGroupInfo
demo The collection controls
Data binding • Data binding is the process that establishes a connection between the app UI and business logic • Can be declarative or defined in code • Binding actions enable customization of the binding logic • Value convertors • Binding modes • One-Way, Two-Way, One-Time
demo Data binding
Templates • Enables re-usable declarative XAML to define data binding behavior and presentation • Can define the template for the panel in which the contents will appear • Can define the template for the items themselves
demo Templates
demo Binding to a ListView Turning data into visualization
Interacting with data controls- selection • Single and multiple selection • Master/detail view • Shopping carts etc
demo Selection and multiple selection
Recap • What’s new and different with data apps in Windows 8 • Understand asynchronous connection • Think in terms of cloud data • Your XAML and .NET skills apply • LINQ and understanding collections and observable collections • XAML for controls and templates • Data binding and convertors • Using the new collection controls
Related sessions • [APP-737T] Metro style apps in XAML: what you need to know • [APP-503T] Make great touch apps using XAML • [APP-517T] Build polished collection and list apps using XAML
Further reading and documentation • Windows 8 SDK – Source of all the samples here! • Build Hands-on-Labs
thank you Feedback and questions http://forums.dev.windows.com Session feedbackhttp://bldw.in/SessionFeedback
© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.