From the course: Microsoft XAML: 2 Content and Properties
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Attached properties with the grid
From the course: Microsoft XAML: 2 Content and Properties
Attached properties with the grid
- [Narrator] I thought I would look at setting some attached properties and reading some attached properties, and the example I'll work with is a grid, and its attached properties. So what I have in my UI is an ellipse. You can see it over here, and if I click on my grid, you can see in the designer, the rows and columns that are part of this grid. So you define those in a grid, by setting our RowDefinitions and ColumnDefinitions. I've created three columns and three rows, and I've set the height to a factor here. I have 1.0, 1.5, and 1.0. These are units, so that means that the middle row is slightly higher and slightly wider than the other rows and columns. I've defined my columns and my rows and I've put the ellipse in the first row in the first column, and I did that by just putting the ellipse in here. I didn't specify a row and I didn't specify a column, so it goes in row zero, column zero. So the user dependency property in XAML, you type the name of the class that defines the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
The trouble with normal .NET properties for UI7m 56s
-
(Locked)
Explore the concept of dependency properties4m 33s
-
Use some dependency properties4m 53s
-
(Locked)
Order of precedence for dependency properties8m 56s
-
(Locked)
Explore the concept of attached properties4m 35s
-
(Locked)
Attached properties with the grid3m
-
(Locked)
Attached properties with the canvas3m 36s
-
(Locked)
Concepts of custom dependency properties3m 10s
-
(Locked)
Register the custom dependency property3m 20s
-
(Locked)
Use the custom dependency properties2m 1s
-
(Locked)
-