Layout Compression
Layout Compression allows you to specify unnecessary nesting and allows Xamarin.Forms to opt-out of creating that layout view.
Using Xamarin Inspector we can view the UI layering of a Xamarin.Forms page. In this example we will use a Xamarin.Forms version of the Netflix App to see how much we are able to flatten the UI of a App.
Profile View
Default
Layout Compression
- Default: 71 Renderers.
- Layout Compression: 51 Renderers.
28% off
Home View
Default
Layout Compression
- Default: 223 Renderers.
- Layout Compression: 169 Renderers.
24% off
Detail View
Default
Layout Compression
- Default: 296 Renderers.
- Layout Compression: 229 Renderers.
22% off
Feedback
Please use GitHub issues for questions or comments.
Copyright and license
Code released under the MIT license.