Пример #1
0
 protected override void PrepareMeasureContainers()
 {
     if (CurrentContainerView != null)
     {
         CurrentContainerView.Measure(Size.Empty);  // Available size is ignored when preparing blocks
     }
 }
Пример #2
0
        private Size FinalizeMeasure()
        {
            foreach (var scalarBinding in ScalarBindings)
            {
                // Resizing auto size binding should invalidate measure, the binding should only be measured with infinity length, which was done in previous PrepareMeasure.
                if (scalarBinding.IsAutoSize)
                {
                    continue;
                }

                for (int i = 0; i < scalarBinding.FlowRepeatCount; i++)
                {
                    var element = scalarBinding[i];
                    element.Measure(GetSize(scalarBinding));
                }
            }

            if (IsCurrentContainerViewIsolated)
            {
                CurrentContainerView.Measure(GetSize(CurrentContainerView));
            }

            for (int i = 0; i < ContainerViewList.Count; i++)
            {
                var containerView = ContainerViewList[i];
                containerView.Measure(GetSize(containerView));
            }

            return(MeasuredSize);
        }