From the course: Microsoft XAML: 3 Type Converters and Resources
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Use some type converters
From the course: Microsoft XAML: 3 Type Converters and Resources
Use some type converters
- [Narrator] There are a lot of Type Converters available in the WPF assemblies that make it easier for you to write your XAML. I thought I'd show you some of those Type Converters before I show you the XAML syntax. I wrote this application called ShowTypeConverters, here's what it looks like. I'll debug the application. And what it does, is there's a list box on the left side of the screen, I've written some code that uses reflection to look in the WPF assemblies and find all the types that derive from the base class Type Converter and they're listed here. And when you click on one of them, like the FontSizeConverter, you'll see that it adds it to this list box on the right side of the screen. So there's that FontSizeConverter and a LengthConverter, there's something called a ThicknessConverter also I have converters for working with brushes, takes a string and turns it into a brush or takes a string and turns it into a color. And at the very bottom of the list you'll see 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
-
-
-
Explore the concepts of type converters5m 26s
-
(Locked)
Use some type converters6m 30s
-
(Locked)
Create a custom type converter8m 24s
-
(Locked)
A markup extension and how it compares to a type converter3m 11s
-
(Locked)
Use some common markup extensions5m 47s
-
(Locked)
Create a custom markup extension3m 29s
-
(Locked)
Add parameters to a custom markup extension4m 34s
-
-
-