Application got crash when load the PullToRefresh and Expander controls within different layouts. #224
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bug Description
1.Application got crash when load the PullToRefresh controls within different layouts.
2.When setting the PullTorefresh API in GlobalStyles exception occurs.
3. Application crashes when setting the API's using Global Styling in Accordion and Expander control. Adding the Unit test cases for the Expander and Accordion.
Root Cause
1.The Layouts will have infinite width or height when it is measured in the control.So,it returns the infinite value because of that exception occurs.
2.When setting the PullTorefresh API in GlobalStyles the ProgressCircleView is null it is not loaded.So,that issue exception occurs in the layouts.
3.When setting the API in global styling ,while loading it calls the its API property changed methods first so in that items were not loaded .So items become null then the exception occurs.
Is Breaking issue?
No
Solution description
1.Manually added the height as 300 if the height is infinite and added width as 300 if the width is infinite for windows.For other than windows added the DeviceDisplay width and DeviceDisplay height for it.
2.Added the null check condition ProgressCircleView is not null for the API PropertyChanged methods.
3.Added the condition if the IsViewLoaded is false then it should return in the propertychanged methods.
Output screenshots
Windows:
Screen.Recording.2025-07-15.114653.mp4
Screen.Recording.2025-07-23.144743.mp4
Android:
Screen.Recording.2025-07-23.145601.mp4
Unit test case Image:

Areas affected and ensured
No areas were affected.
Test cases
Tested the Styles cases in all platforms.
Tested the Layout cases in all platforms.
Does it have any known issues?
No
MR CheckList