示例#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);
        }
示例#2
0
文件: Page.cs 项目: 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);
        }