CSharp examples for System.Windows.Forms:Control
Align Form Controls to Bottom
// Copyright (c) .NET Foundation. All rights reserved. using System.Windows.Forms; using System;/*from w w w.j a v a2 s . c o m*/ public class Main{ public static void AlignBottom(params Control[] controls) { int maxBottom = int.MinValue; foreach (Control c in controls) { maxBottom = Math.Max(maxBottom, c.Bottom); } foreach (Control c in controls) { c.Top = maxBottom - c.Height; } } }