Visual Basic (Declaration) | |
---|---|
Public Property Columns As TableColumnCollection |
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As Table Dim value As TableColumnCollection instance.Columns = value value = instance.Columns |
C# | |
---|---|
public TableColumnCollection Columns {get; set;} |
Delphi | |
---|---|
public read-write property Columns: TableColumnCollection; |
JScript | |
---|---|
public function get,set Columns : TableColumnCollection |
Managed Extensions for C++ | |
---|---|
public: __property TableColumnCollection* get_Columns(); public: __property void set_Columns( TableColumnCollection* value ); |
C++/CLI | |
---|---|
public: property TableColumnCollection^ Columns { TableColumnCollection^ get(); void set ( TableColumnCollection^ value); } |
You can specify the width of each column in TableColumn element. Similar to Grid, you can input a double length value, or use Auto and Star (*) unit type as the value of the Width property. Note that the column width specified will not always be applied as the width of the cell. If CellSpacing and border formatting are specified in Table element, the width of the cell will be the result of the column width subtracted with these values.
XAML | ![]() |
---|---|
<Intersoft:FlowDocument> <Intersoft:Table Borders="1,Single,#FF000000"> <Intersoft:Table.Columns> <Intersoft:TableColumn Width="100"/> <Intersoft:TableColumn Width="Auto"/> <Intersoft:TableColumn Width="2*"/> </Intersoft:Table.Columns> <Intersoft:TableRowGroup> <Intersoft:TableRow> <Intersoft:TableCell> <Intersoft:Paragraph> <Intersoft:Run> Cell at Row 1 Column 1 </Intersoft:Run> </Intersoft:Paragraph> </Intersoft:TableCell> <Intersoft:TableCell> <Intersoft:Paragraph> <Intersoft:Run> Cell at Row 1 Column 2 </Intersoft:Run> </Intersoft:Paragraph> </Intersoft:TableCell> <Intersoft:TableCell> <Intersoft:Paragraph> <Intersoft:Run> Cell at Row 1 Column 3 </Intersoft:Run> </Intersoft:Paragraph> </Intersoft:TableCell> </Intersoft:TableRow> </Intersoft:TableRowGroup> </Intersoft:Table> </Intersoft:FlowDocument> |
In the above code, three TableColumn elements are specified in the Table. The width of the first, second, and third column is 100, Auto, and 2* respectively. Note that Auto is equal to one-star (*) value.
TableColumn is not inherited from TextElement, so you cannot specify common flow element formatting in this element.
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family