bool ShouldLayoutChildren() { if (!LogicalChildren.Any() || Width <= 0 || Height <= 0 || !IsNativeStateConsistent) { return(false); } var container = this as IPageContainer <Page>; if (container?.CurrentPage != null) { if (InternalChildren.Contains(container.CurrentPage)) { return(container.CurrentPage.IsPlatformEnabled && container.CurrentPage.IsNativeStateConsistent); } return(true); } var any = false; for (var i = 0; i < LogicalChildren.Count; i++) { var v = LogicalChildren[i] as VisualElement; if (v != null && (!v.IsPlatformEnabled || !v.IsNativeStateConsistent)) { any = true; break; } } return(!any); }
bool ShouldLayoutChildren() { if (!LogicalChildren.Any()) { return(false); } var container = this as IPageContainer <Page>; if (container?.CurrentPage != null) { return(true); } var any = false; for (var i = 0; i < LogicalChildren.Count; i++) { var v = LogicalChildren[i] as BaseHandle; if (v != null) { any = true; break; } } return(!any); }