Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
Archivo: Page.cs Proyecto: yl33/TizenFX
        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);
        }