[WinRT/UWP] Do not allow IsPresented use in Split mode on desktop #707

merged 2 commits into from Mar 3, 2017


None yet
5 participants

pauldipietro commented Jan 23, 2017

Description of Change

The IsPresented property should not function on WinRT/UWP in Split mode (whereas one can use Popover mode instead); currently setting IsPresented = false doesn't hide the pane when Split is being used, but it can subsequently be changed causing some unintended behavior with the master page. A check is done to prevent false from being set while also allowing the initial layout behavior to still display the master pane when using Split mode.

A side note is that the reproduction can trigger an InvalidOperationException when clicking around between the modes and changing the IsPresented value which I believe appears to be unrelated to this and involves how core handles IsPresented changing.

Bugs Fixed


API Changes


Behavioral Changes

Technically speaking, people could be working around the behavior, so some unintended changes might occur, but I don't know how likely this is.

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Consolidate commits as makes sense
@@ -281,6 +281,11 @@ void UpdateDetailTitle()
void UpdateIsPresented()
+ // Ignore the IsPresented value being set to false for Split mode on desktop and allow the master
+ // view to be made initially visible
+ if (Device.Idiom == TargetIdiom.Desktop && Control.IsPaneOpen && Element.MasterBehavior != MasterBehavior.Popover)

This comment has been minimized.


StephaneDelcroix Jan 24, 2017


we could Log() something here in debug mode.


StephaneDelcroix Jan 24, 2017


we could Log() something here in debug mode.

@rmarinho rmarinho merged commit b53ccf0 into master Mar 3, 2017

@rmarinho rmarinho deleted the fix-bugzilla51236 branch Mar 22, 2017

@jimmgarrido jimmgarrido referenced this pull request in xamarin/xamarin-forms-samples Mar 28, 2017


Workaround for UWP b#53215 in MasterDetailPage sample #178

@samhouts samhouts added D-15.4 and removed cla-not-required labels Oct 10, 2017

@samhouts samhouts modified the milestones: 2.3.0, 2.3.5 Jun 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment