mirror of
				https://github.com/nsnail/spectre.console.git
				synced 2025-10-31 09:09:25 +08:00 
			
		
		
		
	Update border documentation
This commit is contained in:
		
							
								
								
									
										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 | ||||
| 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. | ||||
|   | ||||
							
								
								
									
										
											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 | ||||
|  | ||||
| For a list of borders, see the [Borders](xref:borders) appendix section. | ||||
|  | ||||
| ```csharp | ||||
| // Sets the border kind | ||||
| table.SetBorderKind(BorderKind.None); | ||||
| table.SetBorderKind(BorderKind.Ascii); | ||||
| table.SetBorderKind(BorderKind.Square); | ||||
| table.SetBorderKind(BorderKind.Rounded); | ||||
| // Sets the border | ||||
| table.SetBorder(Border.None); | ||||
| table.SetBorder(Border.Ascii); | ||||
| table.SetBorder(Border.Square); | ||||
| table.SetBorder(Border.Rounded); | ||||
| ``` | ||||
|  | ||||
| ## Expand / Collapse | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Patrik Svensson
					Patrik Svensson