Why Learn XAML?

You may be wondering why you need to understand and write XAML, as Expression Blend has always been available to act as a XAML designer for building user interfaces that can take away most of the need to write XAML itself. In addition, Visual Studio 2010 now contains a drag-and-drop XAML designer too, although it's not quite as fully featured as Expression Blend's. It's important to remember that Silverlight as a technology revolves around its XAML core. Understanding the fundamental concepts of XAML is akin to learning how to count—you need to learn how to count before you can get a grasp on algebra. Therefore, your primary concern when learning Silverlight is to understand the underlying concepts of XAML, even if you don't initially completely learn its syntax.

In the early days, there wasn't a drag and drop designer surface in Visual Studio for Silverlight developers, which made it necessary to either write the XAML by hand or use Expression Blend. However, now that there is a XAML designer for Silverlight developers in Visual Studio 2010, you could probably get away with not learning the XAML syntax for a while and solely use that or the Expression Blend designer to design your user interfaces. You will, however, need to learn and understand the underlying concepts for structuring user interfaces in XAML in order to develop them effectively.

If you've ever worked on an ASP.NET project, you probably have resorted to modifying the HTML directly instead of using the HTML designer, and you will unfortunately face this same issue with XAML at times. Therefore, it's best to avoid having a complete reliance on the drag-and-drop designers. XAML may look confusing at first, but with a good understanding of the concepts and some help from IntelliSense, you will find that the syntax, becomes very easy to read and write.

Most of this chapter is designed to help you understand the concepts, structure, and syntax of XAML, but it is also interspersed with practical examples to demonstrate the concepts and put them into perspective.

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

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