/// <summary> /// Returns true if the child is top aligned with Panel or has no vertical alignment instructions /// </summary> private bool IsAlignTopWithPanel(IFrameworkElement child) { return(RelativePanel.GetAlignTopWithPanel(child) || !( RelativePanel.GetAlignBottomWithPanel(child) || RelativePanel.GetAlignVerticalCenterWithPanel(child) || RelativePanel.GetAlignTopWith(child) != null || RelativePanel.GetAlignBottomWith(child) != null || RelativePanel.GetAbove(child) != null || RelativePanel.GetBelow(child) != null )); }