static IControl Align(IControl self, TextAlignment alignment) { switch (alignment) { case TextAlignment.Left: return(self.Dock(RectangleEdge.Left)); case TextAlignment.Right: return(self.Dock(RectangleEdge.Right)); default: return(self.CenterHorizontally()); } }
public static IControl Center(this IControl control) { return(control.CenterHorizontally().CenterVertically()); }