| Start |
|---|
Adding Constraints With iOS 9+ Layout Anchors |
Adding Constraints Using Visual Format Language (VFL) You may find some constraint types, like aspect ratios (opens new window), cannot be conveyed in Visual Format Language (VFL) syntax and must call the appropriate methods directly. |
| Using Cirrious.FluentLayout Using NuGet An expanded example based on the starter example at the GitHub (opens new window) Page, a simple first name, last name labels and fields all stacked one on top of the other: |
| Adding Constraints with Masonry Masonry is a library for objective-c but xamarin have created a binding for it and created it as a nuget package https://www.nuget.org/packages/Masonry/ (opens new window). Nuget install This centers a button 100 points below the centre point of the containing view and sets a width between 200 and 400 points This sets a scaled image 100 points above the centre point of the containing view then sets the width to the width of the containing view with a muliplier of 0.5 which means 50% of the width. It then sets the height to the width multiplied by the aspect ratio which causes the image to scale but maintain its correct aspect ratio |
Read Article
https://develop.horje.com/learn/1434/reference