mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-16 17:02:51 +08:00
Update border documentation
This commit is contained in:
parent
b46d0fa4f6
commit
1601ef24b3
19
docs/input/appendix/borders.md
Normal file
19
docs/input/appendix/borders.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
Title: Borders
|
||||||
|
Order: 2
|
||||||
|
---
|
||||||
|
|
||||||
|
There is different built-in borders you can use for tables and panels.
|
||||||
|
|
||||||
|
# Built-in borders
|
||||||
|
|
||||||
|
<img src="../assets/images/borders.png" style="max-width: 100%;">
|
||||||
|
|
||||||
|
# Usage
|
||||||
|
|
||||||
|
To create a table and set it's border to `SimpleHeavy` as seen in the
|
||||||
|
image above:
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
var table = new Table();
|
||||||
|
table.Border = Border.SimpleHeavy;
|
||||||
|
```
|
@ -1,5 +1,5 @@
|
|||||||
Title: Styles
|
Title: Styles
|
||||||
Order: 0
|
Order: 1
|
||||||
---
|
---
|
||||||
|
|
||||||
Note that what styles that can be used is defined by the system or your terminal software, and may not appear as they should.
|
Note that what styles that can be used is defined by the system or your terminal software, and may not appear as they should.
|
||||||
|
BIN
docs/input/assets/images/borders.png
Normal file
BIN
docs/input/assets/images/borders.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 415 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB |
@ -46,12 +46,14 @@ This will render the following output:
|
|||||||
|
|
||||||
## Borders
|
## Borders
|
||||||
|
|
||||||
|
For a list of borders, see the [Borders](xref:borders) appendix section.
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
// Sets the border kind
|
// Sets the border
|
||||||
table.SetBorderKind(BorderKind.None);
|
table.SetBorder(Border.None);
|
||||||
table.SetBorderKind(BorderKind.Ascii);
|
table.SetBorder(Border.Ascii);
|
||||||
table.SetBorderKind(BorderKind.Square);
|
table.SetBorder(Border.Square);
|
||||||
table.SetBorderKind(BorderKind.Rounded);
|
table.SetBorder(Border.Rounded);
|
||||||
```
|
```
|
||||||
|
|
||||||
## Expand / Collapse
|
## Expand / Collapse
|
||||||
|
Loading…
x
Reference in New Issue
Block a user