ispiro
ispiro

Reputation: 27673

Event when controls have Width and Height

I need the actual Width and Height of controls in Xamarin.Forms (which are inside a StackLayout).

I thought I could get that in the OnAppearing method, but they are still both -1.

So when/how do I get the actual Width and Height of controls in Xamarin.Forms?

Upvotes: 0

Views: 51

Answers (1)

Morse
Morse

Reputation: 9124

Check them within OnSizeAllocated method , then they wont be -1

You can override that method too.

Upvotes: 1

Related Questions