Summary

In this chapter, we finally got to touch code. While XAML is powerful and fun to work with, sometimes you need to get your hands dirty and write code to get the result you aim for. We started this chapter with learning about events, how to handle them, the different types of event Silverlight offers, and the concept of AddHandler.

We then moved on to consuming web services, a key concept in the data driven world of today. We learned how to create service references for the different environments we might work with; we handled asynchronous events, configured service endpoints, and learned how to handle timeouts. We finished the chapter with learning about cross-domain network access and how to build a clientaccesspolicy.xml file.

Our next subject was background threads where we built an application that spawned its heavy duty calculation to a background thread, leaving the UI layer free for the user to interact with. Once it was done, we moved on to talk about dependency properties—what they are, and why they are good for us. Once the core concepts were rooted in our minds, we went on and created our first dependency property.

Our next stop in this chapter was the attached properties. We learned what they are and how they work, and saw how we can set these properties on both XAML and code behind.

We finished the chapter off with the introduction of ICommand and the Silverlight commanding system.

In the next chapter, we are going to discuss all about data—how to format data, how to implement data binding, how to create converters, and finally, how to perform data validation.

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

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