Пример #1
0
 /// <summary>Centers the control inside the parent control.</summary>
 /// <param name="control">The control to center.</param>
 /// <param name="centerX">Center X coordinate.</param>
 /// <param name="centerY">Center Y coordinate.</param>
 /// <returns>The <see cref="Control" />.</returns>
 public static Control ToCenter(this Control control, bool centerX, bool centerY)
 {
     ControlManager.CenterControl(control, control.Parent, centerX, centerY);
     return(control);
 }
Пример #2
0
 /// <summary>Centers the <see cref="Control" /> inside the parent <see cref="Control" />.</summary>
 /// <param name="control">The control to center.</param>
 /// <returns>The <see cref="Control" />.</returns>
 public static Control ToCenter(this Control control)
 {
     ControlManager.CenterControl(control, control.Parent, true, true);
     return(control);
 }