29.06.2015 Views

Advanced Silverlight

Advanced Silverlight

Advanced Silverlight

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Microsoft Jump Start Course<br />

Building Applications for Windows Phone Mango | Module 3<br />

Published: 8/22/2011<br />

Data Binding<br />

• Simplest way to program UI controls is to write your own “glue” to<br />

get and set properties of controls<br />

– e.g. textBox1.Text = "Hello, world";<br />

• In complex applications, such code quickly becomes unwieldy and<br />

error prone.<br />

• Use <strong>Silverlight</strong> data binding to link your UI to a class in your<br />

application that contains your application data<br />

– A data class that is a source for data binding is called a ViewModel<br />

• UI controls can get their display values automatically from properties<br />

of the viewmodel class<br />

– Changing the property, updates the display<br />

– User input can automatically update the bound property of the viewmodel class<br />

27<br />

©2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista, Windows Azure, Hyper-V 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<br />

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 />

27

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!