Q: Get height of action bar as soon as drawn

uiux

#1

Hi

I got a question regarding the events and accessing the measured values of an element.

I would like to listen on an event, that fires as soon as the ActionBar or a StackLayout is drawn and access its according measurements.

What I did so far is I listen to

  • ngOnInit
  • ngAfterViewInit
    and registered to the (loaded)= event on the Layout for example.

If I try to read the measurements, i.e. the height is always 0.

I googled and it seems there is no real event when an element is really drawn or measured.

Is there any possibility to access these properties as soon as drawn or listen to an according event?

Thanks in advance


#2

This may help (make sure you read ALL of it, including the various events you can listen to, at the end):


#3

Hey @pentool

I could swear I did exactly that with navigatedTo but didn’t get any result.

Now it works ^^’ I don’t know what I did wrong before as I reverted already… damn it.

Sorry about the inconvenience and thanks a lot


#4

No worries. I live in a forest myself and many times I don’t see it because of all the trees.