Hello!! πββοΈ Continuing with the 7DaysChallenge initiative, as our fourth challenge, we’re going to work with Padding, Margin and Translations 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.
Let’s start!
π― Day 4- Challenge – Padding, Marging & Translations in Xamarin & .NET MAUI.
Do you already have the answers? πππ
π‘ Click here to see the solution
The correct answer is the option B! π
The correct answer is B due to the following points:
-
-
Padding property represents the distance between an element and its children, in this case, we have the Padding assigned to the Button, the content inside is the Text property, the Padding positioning values ββwill be applied to this property .
-
While the Margin property represents the distance between an element and its adjacent elements, and the Translations properties, directly move the axis X or Y.
-
Finally, I leave you the result of each of the three scenarios so that you can graphically perceive the difference.
Recommended resources:
Important to know: This code will work for you in the same way both in Xamarin Forms and in .NET MAUI! π
If you want to delve into Margin, Padding and Translations properties, I recommend you the following article.
Understanding the differences between Margin & Padding and Translation properties
I hope you liked it and it was useful!
I’ll wait for you in the next challenge! π Thank for reading! ππ
2 thoughts on “#7DaysChallenge β Day 4: Padding, Marging & Translations in Xamarin & .NET MAUI”