/// <summary>Arranges the content of a <see cref="T:System.Windows.Controls.Canvas" /> element.</summary> /// <param name="arrangeSize">The size that this <see cref="T:System.Windows.Controls.Canvas" /> element should use to arrange its child elements.</param> /// <returns>A <see cref="T:System.Windows.Size" /> that represents the arranged size of this <see cref="T:System.Windows.Controls.Canvas" /> element and its descendants.</returns> // Token: 0x06004335 RID: 17205 RVA: 0x00133674 File Offset: 0x00131874 protected override Size ArrangeOverride(Size arrangeSize) { foreach (object obj in base.InternalChildren) { UIElement uielement = (UIElement)obj; if (uielement != null) { double x = 0.0; double y = 0.0; double left = Canvas.GetLeft(uielement); if (!DoubleUtil.IsNaN(left)) { x = left; } else { double right = Canvas.GetRight(uielement); if (!DoubleUtil.IsNaN(right)) { x = arrangeSize.Width - uielement.DesiredSize.Width - right; } } double top = Canvas.GetTop(uielement); if (!DoubleUtil.IsNaN(top)) { y = top; } else { double bottom = Canvas.GetBottom(uielement); if (!DoubleUtil.IsNaN(bottom)) { y = arrangeSize.Height - uielement.DesiredSize.Height - bottom; } } uielement.Arrange(new Rect(new Point(x, y), uielement.DesiredSize)); } } return(arrangeSize); }