Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 10481 [details]
This is a redux of this other bug:
Now in addition to NavigationPage wrapping view controllers modal pages are also wrapped in a parent view controller, and this breaks simple use cases for custom page renderers. In this case what I'm trying to do is set a ModalPresentationStyle of the custom renderer, which I should be able to do in the constructor:
ModalPresentationStyle = UIModalPresentationStyle.FormSheet;
That doesn't work because the actual property used to decide how to display the page is in the ModalWrapper class, which becomes the parent of this view controller.
To reproduce this run the attached project and click the button. What you should see is a form sheet with a button to dismiss. Instead you see a full screen page with a button to dismiss.
To work around the bug you can uncomment this code in the custom renderer:
public override void WillMoveToParentViewController(UIViewController parent)
if (parent != null)
parent.ModalPresentationStyle = ModalPresentationStyle;
This should NOT be needed. If you are going to wrap our page renderers automatically then you should be forwarding ALL properties that affect the display and behavior of the view controller to the child. That includes things like rotation behavior, status bar behavior, presentation style, everything in NavigationItem, etc.
I have seen several people get confused by this on the Xamarin forums because it's not expected behavior, and understanding why it doesn't work requires understanding the private implementation of Xamarin.Forms. Worse, it has changed behavior (so this is a regression).
Please keep this kind of stuff in mind when implementing Xamarin.Forms. Wrappers need to be transparent so that they don't interfere with the wrapped objects.
This is iOS-specific.
Thank you for the request
This is not a feature request. It's a regression. It's not clear to me what this resolution means. Is it going to fixed or did it just move onto some feature backlog?