When I show a popover screen, I get some random size that doesn’t seem adjustable.
When I show a popover container, I get the container size but the controls in the container get shifted based on the direction of the arrow of the popover (I’m clicking on objects in a canvas and popover points to the location of the object on the canvas).
The documentation for the MobileContainer.ShowPopOver indicates that you might have to set constraints in code:
I see the same.
MobileScreen.ShowPopover should not be used in any project that can run on iPad.
If you have iOSDesignExtensions, you can change the size like this (only applies to iPad), but it will not display the arrow.
Var popover As new ScreenPopover
popover.ShowModal(parent, MobileScreen.ModalPresentationStyles.FormSheet)
popover.SetPreferredContentSizeXC(new Size(540, 620))
When using MobileContainer.ShowPopover, you can define constraints in the MobileContainer opening event (only applies to iPad)
Var width As New iOSLayoutConstraint(self, _
iOSLayoutConstraint.AttributeTypes.Width, _
iOSLayoutConstraint.RelationTypes.Equal, _
nil, iOSLayoutConstraint.AttributeTypes.None, _
1.0, 500)
self.AddConstraint(width) //Self is the mobilecontainer
Var Height As New iOSLayoutConstraint(self, _
iOSLayoutConstraint.AttributeTypes.Height, _
iOSLayoutConstraint.RelationTypes.Equal, _
nil, iOSLayoutConstraint.AttributeTypes.None, _
1.0, 500)
self.AddConstraint(Height)
You are correct, there is an implicit MobileScreen that holds the container. That screen can not be accessed by code (except with quite complex Declares).
Thanks, Jeremie. Excellent suggestions as usual. I’m going to play with the constraints and see if that does anything to solve the shifting controls issue.