From the course: .NET MAUI: Beyond the Basics

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Solution: Creating a XAML form

Solution: Creating a XAML form - .NET MAUI Tutorial

From the course: .NET MAUI: Beyond the Basics

Solution: Creating a XAML form

(upbeat music) - [Instructor] Let's take a look at how I solve this problem. I'm going to show excerpts in the code for this video. So make sure you have downloaded it if you want to look through it. We'll start with loading the resources into the label control. If you recall, we can create custom XAML extensions to do things such as loading custom content into a property, in this case, the text property of the label. So let's go into extensions and resource loader extension. This extension has two properties. The first is the name of the resource that we are looking for and the second is the name of the file in the assembly we want to use. We implement the I markup extension and we want to return the string label. Let's look at the provide value method and we could see some pretty standard code to load a resource and return a specified value. Sometimes, it isn't altogether clear the exact file name as the…

Contents