WhileWidth and WhileHeight

I would like to have those two conditional triggers available. They would be used along with elements and therefore would not be relative to screen sizes.
These would allow us to check for minimum and maximum dimensions for panels and make UI decisions based on the values.

For example, while building an UI element to display the space available in a device, I ran into a case where, if the width of the bar that represents used space is smaller than 50% (or 80 pixels), the label text would not fit in it and I would have to hide it and change the bar color to indicate low space availability.

It would work something likeā€¦

<Panel ux:Name="_thisPanel" Color="White" Width="{observableValue}">
    <Text ux:Name="_thisLabel" Value="Free Space" Color="White" Alignment="Center" />

    <WhileWidth GreaterThanOrEqualTo="50%">
         <Change Target="_thisLabel.Visibility" Value="Visible" />
         <Change Target="_thisPanel.Color" Value="Green" />
    </WhileWidth>
    <WhileWidth LessThan="50%">
         <Change Target="_thisLabel.Visibility" Value="Collapsed" />
         <Change Target="_thisPanel.Color" Value="Red" />
    </WhileWidth>
</Panel>

+1

Indeed a nice feature :slight_smile: Not high priority for us right now so I cant give any ETA. Shouldnt be too bad to implement in Uno code though