Overcoming XAML's Steep Learning Curve

Unfortunately, despite all XAML's benefits, learning, understanding, and becoming productive in XAML is likely to be your greatest hurdle when attempting to develop your first Silverlight applications. Things will seem harder than they should be and will invariably lead to initial frustration with the technology. The problem is that (as a general rule) the more flexible something is, the more complex it is to understand and use. XAML unfortunately suffers from this same pitfall. As a result, you will be faced with a steep learning curve. XAML introduces new concepts to the way to define and design user interfaces and requires you to invest in a new way of thinking in how you do so.

Some examples of the types of issues you are likely to face when getting up to speed with XAML include the following:

  • Things may seem harder than you initially think should be. For example, no property on the Button control lets you display an image on the button. This is because XAML has enabled a more flexible method to display custom content in buttons (an example of this can be found in the “Content Element Syntax” section of this chapter).
  • XAML introduces many new concepts that may not have been part of previous technologies you've worked with. For example, concepts such as attached properties, markup extensions, styles, and data templates will likely be new to you.
  • Properties you are used to finding on controls in previous technologies you've worked with may not exist in Silverlight controls or will have different names from what you might expect. For example, the Button control has no Text property in Silverlight. Neither does it (or any other control) have properties that can be used to position it within the user interface. Some of these differences will be raised throughout this chapter.

Despite the challenges of learning XAML, it is worth the effort to work through them, and the reason XAML is structured the way it is will make sense in the end, enabling you to start harnessing its power.

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

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