Hello!! 🙋♀️ Continuing with the #7DaysChallenge initiative, as our second challenge we’re going to work with Labels in Xamarin and .NET MAUI!
The challenge shows you a code which you must analyze carefully to see the final result! The solution is below, but don’t see it before analyse your answer! Let us begin!
I invite you to take a look at all the challenges of this initiative, each of them has its technical explanations and recommended articles to study! You can give them an eye in the article #7DaysChallenge with Xammy.
🎯 Day 2- Challenge – Labels in Xamarin & .NET MAUI.
💡 Click here to see the solution
The correct answer is the option C! 🎊
The correct answer is C due to the following points:
- FormattedText specifies the presentation of text with multiple presentation options such as fonts and colors in the same Label.
🤔 If you are wondering about the remaining two options, here are their explanations:
- Option A: This format does not exist, you will get an error.
- Option B: The default orientation of the StackLayout is Vertical, not Horizontal, so it can’t add the Labels in a Horizontal line.
Important to know: This code will work for you in the same way both in Xamarin Forms and in .NET MAUI! 💕
I hope you liked it and it was useful!
I’ll wait for you in the next challenge! 😎 Thank for reading! 💚💕