Back to Devexpress

TreeListView.CalcColumnBestFitWidth(BaseColumn) Method

wpf-devexpress-dot-xpf-dot-grid-dot-treelistview-dot-calccolumnbestfitwidth-x28-devexpress-dot-xpf-dot-grid-dot-basecolumn-x29.md

latest2.1 KB
Original Source

TreeListView.CalcColumnBestFitWidth(BaseColumn) Method

Returns the column’s optimal (minimum) width required to display its contents completely.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public double CalcColumnBestFitWidth(
    BaseColumn column
)
vb
Public Function CalcColumnBestFitWidth(
    column As BaseColumn
) As Double

Parameters

NameTypeDescription
columnBaseColumn

A TreeListColumn object that is the treelist column.

|

Returns

TypeDescription
Double

A Double value that specifies the column’s optimal (minimum) width required to display its contents completely.

|

Remarks

If the column’s BaseColumn.FixedWidth option is set to true , the CalcColumnBestFitWidth method returns the column width specified by its BaseColumn.Width property.

Note

The CalcColumnBestFitWidth method should only be called when the treelist is loaded.

To learn more, see Best Fit in Columns Layout and Width.

See Also

BestFitWidth

TreeListView Class

TreeListView Members

DevExpress.Xpf.Grid Namespace