public void RemovePageByLocation (string menuLocation, GridPage replacePage)
{
GridPage foundPage = null;
foreach (var page in Children) {
if (page.Location == menuLocation) {
foundPage = page;
break;
}
if (page.Children.Count > 0) {
var p = GetPageByLocation (menuLocation, page);
if (p != null) {
page.Children.Remove (p);
return;
}
}
}
if (foundPage != null)
Children.Remove (foundPage);
}