ComponentFactory.Quicksilver.Layout.MetaPanelBase.ArrangeOverride C# (CSharp) Method

ArrangeOverride() protected method

Position child elements according to already provided size.
protected ArrangeOverride ( Size finalSize ) : Size
finalSize System.Windows.Size Size that layout should use to arrange child elements.
return System.Windows.Size
        protected override Size ArrangeOverride(Size finalSize)
        {
            // Implement any ClipToBounds property setting
            ImplementClipToBounds(finalSize);

            // Grab the collection of appropriate elements
            ICollection elements = MetaChildren;

            // Ask the panel layout to calculate the target display rectangles for elements
            Layouts.TargetChildren(LayoutId, this, _stateDict, elements, finalSize);

            // Ask the chain of animation handlers to update animation state and elements
            bool needAnimating = AnimateChildren(_stateDict, elements);

            // Faster perf to only set the IsAnimating when we notice a change
            if (needAnimating != IsAnimating)
                IsAnimating = needAnimating;

            // Finally ask the panel layout to arrange elements in animation determined positions
            return Layouts.ArrangeChildren(LayoutId, this, _stateDict, elements, finalSize);
        }