We’ll look at an example application to study the structure of XAML to better understand some of its qualities and uses. If you already understand XML, you’re 90% of the way there already. In lesson 2, we’ll look at all the graphical elements that can be created and their properties and such, so while the XAML we look at will probably make sense to most developers, there may be a few terms or ideas that we’ll just have to explain in the next lesson. We’ll focus solely on the syntax, the form, the structure of the XAML in this video.
- the parentCanvas
- how to declare objects with typical xml syntax
- containment in XAML objects
- attributes in the element define the properties and behavior and event handlers … “property attribute syntax”
- splitting properties into multiple lines to make things more readable
- some properties are default properties can be defined between the open and close tags for the element … “Content Element Syntax for Properties”
- some properties require more information because they are complex … lie creating brushes … “Property Element Syntax”
- “Implicit Collection Syntax” … in some cases, you don’t need to define the collection … its implied.
- Not all properties are created equally … “dependency properties” or “attached properties” … allows you to assign a value to a property that is not a member property of the object. In this case, Canvas.Top and Canvas.Left and Canvas.ZOrder is not a property of Rectangle, however, it is dependent on an ancestor element … its parent … for its placement. For now, you can take it at its face value … its just how you position a graphical element on a canvas, but internally there’s a bit more to it in regards to resolving values assigned to that property by multiple sources and which one gets the precidence.
This webpage describes one video of hundreds hosted on this website. HOWEVER …
This video has been removed from our collection.
Read why I decided to keep old pages like this around. Or better yet, visit the home page … its the best place to get started.
About this video:
Duration: 11 Minutes, 5 Seconds
Recorded Using: Silverlight 1.1 Alpha September Refresh