Reputation: 657
During the xamarin forms development, how to verify if a control is occupying certain pixels in the screen.
(i.e) Like we verify for a web page by going through the developer tools of a browser of the styles each of the element occupies.
Is this possible with Xamarin emulator? To verify if the UI is coming up as expected on the emulator?
Upvotes: 2
Views: 2545
Reputation: 9713
There is the Xamarin Inspector if you can afford a Visual Studio Enterprise subscription.
If you can't afford this (about 6000 $ p.a. is quite something), you could use the Appium Inspector (see here). It's very generic and hence not optimized for Xamarin Forms, but it might do the trick, if you're on a budget.
It allows you to inspect the UI elements and verify that they take the space they should. This is approximately how it looks (I think it's an older version):
Anyway, it's somewhat tricky to set up, but if you have set it up, you can use it to run UI-tests, too (that's what it's usually used for).
Bonus: The lowest key variant to verify that your controls take the space they should is simply setting their background color and visually inspect your layout.
Upvotes: 2