In Some Scenarios a Auto Size Adjusting Gallery is Needed so that Every Item in Gallery is Clearly Visible and Manageable. Today we will be Looking at that Functionality. Simple Yet very Important.
So First Add a Flexible Gallery in Your App.
I have created a simple Collection, with two columns, Name and Description. Data Entered in Collection through these Text Inputs.
As you can see, if the Description is too We can Set it, adjust the size according but then the smaller would look Odd Like Above Image.
Hence the Dynamic Size for each Item.
To Address this there are many ways, Different for every Control, for label just turn on auto height and for seprater set it’s Y property as DescriptionLabel.Y + DescriptionLabel.Height + 10, I also will have to Adjust the Edit and Delete Button Accordingly.
Using (DescriptionLabel.Height / 2) – 10, after that the Result is…..
It Can be Used with Other Controls as well, like for Text Input we can use a Checkbox to trigger size change. i.e. if Current Item Checkbox checked then Text Input Height = 30, else 170.
Very Useful and can be used in many ways. Do try this.