From the course: Microsoft XAML: 1 Core Concepts

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Object elements and property attributes

Object elements and property attributes

From the course: Microsoft XAML: 1 Core Concepts

Start my 1-month free trial

Object elements and property attributes

- [Instructor] UI controls have a lot of customizable properties that help customize the look and behavior of the control. Here's how those properties are expressed in the XML text. Here I have a StackPanel that contains two children: Rectangle and an Ellipse. Remember, these are object elements. And then this is an example of what's called a property attribute. It's an attribute in XML but it maps to a .NET or Win RT property over in the actual object. Now, you can think of this as a one-to-one mapping. There's a fill property and a height property and a width property. That's not exactly true. There's more nuanced than that. There are things called dependency properties and attached properties which we'll discuss later. But for right now we'll just assume that there's one .NET property for each of these. And to see those we can use this (mumbling). Start by looking at the rectangle. Right-click, choose Go To Definition. Here I can see the rectangle class. I see that it has just a…

Contents