Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

MVVM in Windows Phone 7


Published on

Published in: Technology
  • Be the first to comment

MVVM in Windows Phone 7

  1. 1. Chris Koenig<br />Senior Developer Evangelist<br />Microsoft Corporation<br />MVVM in Windows Phone 7<br />
  2. 2. MVVM – In a nutshell<br />2<br />“…building UIs that utilize platform enhancements in WPF and Silverlight to provide good separation between UI and business logic in order to make those UIs easier to maintain by developers and designers.”<br />- Glenn Block<br />
  3. 3. Key elements of MVVM<br />3<br />
  4. 4. MVVM toolkits for WP7<br />4<br />View<br />Model<br />ViewModel<br />HomegrownShips with template<br />MVVM Light<br />NRoute<br />Caliburn<br />Messages<br />Data Binding<br />Commands<br />
  5. 5. MVVM toolkits for WP7<br />ViewModelLocator<br />ViewModel<br />DispatcherHelper<br />RelayCommand<br />EventToCommand<br />Messenger<br />5<br />“Blendability”<br />
  6. 6. Demo - Getting Started<br />
  7. 7. Relay Command<br />Used to send messages from the View to the ViewModel<br />Bind actions on View to Commands on ViewModel<br />Based on the familiar Command pattern<br />ICommand<br />Command Parameters<br />CanExecute<br />Attached Properties<br />7<br />
  8. 8. EventToCommand<br />Blend Behavior for wiring up RelayCommands<br />8<br />
  9. 9. Demo - Commands<br />
  10. 10. Messaging <br />10<br />View<br />View<br />View<br />Messages<br />ViewModel<br />ViewModel<br />ViewModel<br />Messages<br />+ callback<br />© 2010 IdentityMine Inc. Used with permission<br />
  11. 11. Demo – Messaging<br />
  12. 12. Please read (hidden slide)<br />This template is designed for use with Office PowerPoint 2007 and 2010. The charts and graphics can be edited with PowerPoint 2007 and 2010, but not with PowerPoint 2003.<br />This template uses Microsoft’s corporate font, Segoe Light.<br />Segoe is not a standard font included with Windows, so it has been embedded in this template.<br />For Live Meeting situation, please use Segoe Regular<br />More resources:<br />Learn how to use this PowerPoint template by referring to the Windows Phone 7 Guidelines.<br />Find more pre-designed layouts by referring to the Windows Phone 7 Additional Layouts.<br />
  13. 13. Q&A<br />
  14. 14. © 2010 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.<br />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. <br />MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.<br />