Height of an Element from Uno

I have a ScrollView and would like it to go round and round again once it’s reach the end of the scrolling. You know, like scrolling loop.

I have a custom project and .ux and .ux.uno for this. I can control the ScrollPosition, but I cannot get the Height of the content StackPanel. I also cannot get the Height of the ScrollView itself.

Or can?

Hi!

You can listen to the Element.Placed event. It will let you know when Fuse has computed a new size and position for an element.

var content = (Element)theScrollView.Content;

content.Placed += OnPlaced;

And:

void OnPlaced(object sender, PlacedArgs args)
{
    args.NewSize  //  <-- the float2 you are looking for
}

Awesome, thanks :slight_smile: