Intersoft ClientUI Documentation
Width Property
See Also  Send Feedback
Intersoft.Client.Documents Namespace > TableColumn Class : Width Property






Gets or sets the width of the column.

Syntax

Visual Basic (Declaration) 
Public Property Width As GridLength
Visual Basic (Usage)Copy Code
Dim instance As TableColumn
Dim value As GridLength
 
instance.Width = value
 
value = instance.Width
C# 
public GridLength Width {get; set;}
Delphi 
public read-write property Width: GridLength; 
JScript 
public function get,set Width : GridLength
Managed Extensions for C++ 
public: __property GridLength get_Width();
public: __property void set_Width( 
   GridLength value
);
C++/CLI 
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 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

See Also

© 2012 All Rights Reserved.