[UWP]Fixes #3886, Master Detail, incorrect master height after window resize (#5338)

* Fix Issue 3386

* Update Xamarin.Forms.Platform.UAP/MasterDetailControl.cs

Co-Authored-By: bmacombe <brian@agspectrum.com>
This commit is contained in:
Brian Macomber 2019-03-21 09:08:40 -05:00 коммит произвёл Rui Marinho
Родитель be0dc9391b
Коммит e0bf0bc3e0
2 изменённых файлов: 5 добавлений и 10 удалений

Просмотреть файл

@ -228,9 +228,10 @@ namespace Xamarin.Forms.Controls.Issues
BackgroundColor = Color.Gray
},
btn
}
},
BackgroundColor = Color.WhiteSmoke
},
//BackgroundColor = Color.Red
BackgroundColor = Color.Gray
};
if(initState.HasValue)

Просмотреть файл

@ -161,18 +161,12 @@ namespace Xamarin.Forms.Platform.UWP
{
get
{
// Use the ActualHeight of the _masterPresenter to automatically adjust for the Master Title
double height = _masterPresenter?.ActualHeight ?? 0;
// If there's no content, use the height of the control to make sure the background color expands.
if (height == 0)
height = ActualHeight;
double height = ActualHeight;
double width = 0;
// On first load, the _commandBar will still occupy space by the time this is called.
// Check ShouldShowToolbar to make sure the _commandBar will still be there on render.
if (_firstLoad && _commandBar != null && ShouldShowToolbar)
if ((_firstLoad || !ShouldShowSplitMode) && _commandBar != null && ShouldShowToolbar)
{
height -= _commandBar.ActualHeight;
_firstLoad = false;