From the course: .NET MAUI Essential Training
Unlock the full course today
Join today to access over 24,000 courses taught by industry experts.
Solution: Add a style to a control - .NET MAUI Tutorial
From the course: .NET MAUI Essential Training
Solution: Add a style to a control
(upbeat music) - [Instructor] I'm going to go down to our entry here. So there's our style target type entry on line 108. I'm going to go into the visual state group and I know that I can use this visual state called Focused 'cause that's one of the ones that's supported by all of these visual elements. Visual state setters is going to allow me to come in and provide a setter and so I'm going to choose the property of font attributes, and then a value of italic. And that's all it takes for me to make sure that any entry in my application, when it has the focus, will change the font attributes to italicized or italic. Try that on our Android real quick and we'll take a look on the Windows device, just make sure it works on both. So any entry, we can go in. Notice I've got, even the placeholder gets italicized, so if I do burpee, and then when I leave, it goes back to regular text so here you can see the number is italicized…
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.