Border Class |
Namespace: Aspose.Words
The Border type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() | Color |
Gets or sets the border color.
|
![]() ![]() | DistanceFromText |
Gets or sets distance of the border from text or from the page edge in points.
|
![]() ![]() | IsVisible |
Returns true if the LineStyle is not LineStyle.None.
|
![]() ![]() | LineStyle |
Gets or sets the border style.
|
![]() ![]() | LineWidth |
Gets or sets the border width in points.
|
![]() ![]() | Shadow |
Gets or sets a value indicating whether the border has a shadow.
|
Name | Description | |
---|---|---|
![]() ![]() | ClearFormatting |
Resets border properties to default values.
|
![]() ![]() | Equals(Object) |
Determines whether the specified object is equal in value to the current object.
(Overrides ObjectEquals(Object).) |
![]() ![]() | Equals(Border) |
Determines whether the specified border is equal in value to the current border.
|
![]() ![]() | GetHashCode |
Serves as a hash function for this type.
(Overrides ObjectGetHashCode.) |
![]() | GetType | (Inherited from Object.) |
![]() | ToString | (Inherited from Object.) |
Borders can be applied to various document elements including paragraph, run of text inside a paragraph or a table cell.
DocumentBuilder builder = new DocumentBuilder(); builder.Font.Border.Color = Color.Green; builder.Font.Border.LineWidth = 2.5; builder.Font.Border.LineStyle = LineStyle.DashDotStroker; builder.Write("run of text in a green border");
DocumentBuilder builder = new DocumentBuilder(); Border topBorder = builder.ParagraphFormat.Borders[BorderType.Top]; topBorder.Color = Color.Red; topBorder.LineStyle = LineStyle.DashSmallGap; topBorder.LineWidth = 4; builder.Writeln("Hello World!");