Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a transparent Modal Page for Dialogs #2169

Merged
merged 2 commits into from
Aug 21, 2020
Merged

Conversation

dansiegel
Copy link
Member

@dansiegel dansiegel commented Aug 21, 2020

Description of Change

Dialogs up until now relied on reparenting the content on the currently visible page. While this was an elegant way of getting customizable and MVVM friendly dialogs into your Xamarin.Forms app, it also had some negative side affects including:

  • Forced a full UI/Binding refresh
  • The content was only within the scope of the currently visible ContentPage allowing full UI interaction with Navigation Bars and the MasterDetailPage Menu

NOTE There are no unit tests for this as it is ultimately a change to the UI

Android iOS
transparent-modal-android transparent-modal-ios
*Known issue on iOS xamarin/Xamarin.Forms#11877

Bugs Fixed

API Changes

none

Behavioral Changes

Instead of reparenting we now put the Dialog content inside of a new ContentPage with a transparent background. This allows us to present the new Dialog Page modally over the current page using the same masking and content that you had before however the content will now fully cover the NavigationPage Title bar and TabbedPage Tab bar, as well as prevent accessing a MasterDetail while the dialog is presented.

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard

@dansiegel dansiegel merged commit 43d1545 into master Aug 21, 2020
@dansiegel dansiegel deleted the transparent-modals branch August 21, 2020 20:39
@dansiegel dansiegel mentioned this pull request Aug 25, 2020
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment