public override Size ArrangeChildren(FrameworkElement parent, UIElementCollection internalChildren, Size finalSize)
        {
            AdornerPanel adornerPanel = parent as AdornerPanel;

            if (adornerPanel == null)
            {
                return(finalSize);
            }
            ModelItem model          = adornerPanel.Model;
            ViewItem  adornedElement = model == null ? (ViewItem)null : model.View;
            Vector    vector         = (Vector)parent.GetValue(TransformAwareAdornerLayout.DesignerElementScalingFactorWithZoom);

            foreach (UIElement uiElement in internalChildren)
            {
                uiElement.SetValue(TransformAwareAdornerLayout.DesignerElementScalingFactorWithZoom, (object)vector);
                AdornerPlacementCollection currentPlacements = AdornerPanel.GetCurrentPlacements(uiElement);
                currentPlacements.ComputePlacement(AdornerCoordinateSpaces.Default, uiElement, adornedElement, new Vector(1.0, 1.0), finalSize);
                Rect finalRect = new Rect((Point)currentPlacements.TopLeft, (Size)currentPlacements.Size);
                finalRect.Width  = BaseAdornerLayout.ValidateDouble(finalRect.Width, uiElement.RenderSize.Width);
                finalRect.Height = BaseAdornerLayout.ValidateDouble(finalRect.Height, uiElement.RenderSize.Height);
                uiElement.Arrange(finalRect);
                if (uiElement is FrameworkElement)
                {
                    if (adornerPanel.IsMirroredTransform)
                    {
                        uiElement.SetValue(FrameworkElement.FlowDirectionProperty, (object)FlowDirection.RightToLeft);
                        uiElement.RenderTransform = TransformAwareAdornerLayout.RTLAdornerTransformGroup.Create(uiElement, finalRect.Width);
                    }
                    else
                    {
                        uiElement.RenderTransform = TransformAwareAdornerLayout.RTLAdornerTransformGroup.Unwrap(uiElement);
                        uiElement.SetValue(FrameworkElement.FlowDirectionProperty, (object)FlowDirection.LeftToRight);
                    }
                }
            }
            return(finalSize);
        }