/// <summary> /// Initializes a new instance of the <see cref="RectangleBorder"/> class. /// Construct a RectangleBorder with the specified Right and Bottom border and a 0 Left and Top border /// </summary> /// <param name="p_Right">The right border.</param> /// <param name="p_Bottom">The bottom border.</param> public RectangleBorder(Border p_Right, Border p_Bottom) { this.right = p_Right; this.bottom = p_Bottom; this.top = new Border(Color.White, 0); this.left = new Border(Color.White, 0); }
/// <summary> /// Initializes a new instance of the <see cref="RectangleBorder"/> class. /// Construct a RectangleBorder with the same border on all the side /// </summary> /// <param name="p_Border">The border.</param> public RectangleBorder(Border p_Border) { this.top = p_Border; this.bottom = p_Border; this.left = p_Border; this.right = p_Border; }
/// <summary> /// Initializes a new instance of the <see cref="RectangleBorder"/> class. /// Construct a RectangleBorder with the specified borders /// </summary> /// <param name="p_Top">The top border.</param> /// <param name="p_Bottom">The bottom border.</param> /// <param name="p_Left">The left border.</param> /// <param name="p_Right">The right border.</param> public RectangleBorder(Border p_Top, Border p_Bottom, Border p_Left, Border p_Right) { this.top = p_Top; this.bottom = p_Bottom; this.left = p_Left; this.right = p_Right; }
/// <summary> /// Change the width of the current struct instance and return a copy of the modified struct. /// </summary> /// <param name="width">Width of the border.</param> /// <returns></returns> public RectangleBorder SetWidth(int width) { this.top = new Border(Top.Color, width); this.bottom = new Border(Bottom.Color, width); this.left = new Border(Left.Color, width); this.right = new Border(Right.Color, width); return this; }
/// <summary> /// Change the color of the current struct instance and return a copy of the modified struct. /// </summary> /// <param name="p_Color">Color of the border.</param> /// <returns></returns> public RectangleBorder SetColor(Color p_Color) { this.top = new Border(p_Color, Top.Width); this.bottom = new Border(p_Color, Bottom.Width); this.left = new Border(p_Color, Left.Width); this.right = new Border(p_Color, Right.Width); return this; }