Well, the docs make no sense to me.
But I have managed to cobble something together.
The documentation talks about creating a new button in a method and adding contraints there.
(Nobody is ever going to do that.?)
I added a property to the view, of type iosLayoutConstraint, and initialised it in the Opening event
Constraint_portrait = new iOSLayoutConstraint(mycontrol,iOSLayoutConstraint.AttributeTypes.width, iOSLayoutConstraint.RelationTypes.Equal, _
self, iOSLayoutConstraint.AttributeTypes.width,0.02,60)
me.AddConstraint Constraint_portrait
But the parameters are not explained, and don’t seem to match those visible in the IDE
‘addend’ ??
When setting a constraint at design time, its perfectly possible to say that there is no ‘relative control’
Eg you set ‘none’, and 100 percent, and (say) a value of 30
But in code that second control cannot be nil, so I had to put something in.
The last 2 parameters … just … ???
So the values above happen to work for me.
If I change that 60, the control changes size. Result.
On the control itself I have a ‘default’ width property.
I have it set as a fixed (say) 30 , and a low priority
When I want this other layout to take effect, I set it to Active=true and it overrides the default
Working for me.
But the screenshot above looks like a better way of doing things, even if I cannot work out what is going on there.