Intersoft ClientUI Documentation
Width Property (TableColumn)



Gets or sets the width of the column.
Syntax
Public Property Width As GridLength
Dim instance As TableColumn
Dim value As GridLength
 
instance.Width = value
 
value = instance.Width
public GridLength Width {get; set;}
public:
property GridLength Width {
   GridLength get();
   void set (    GridLength value);
}
Remarks

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
Copy Code
<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.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

TableColumn Class
TableColumn Members

Send Feedback