ComponentOne Grid for WPF: Grid for WPF Appearance > Setting Text Wrapping

Setting Text Wrapping

In the 2009 v1 release, Grid for WPF introduced several options for grid text alignment. Now it's easy to specify how grid content will be wrapped. 

The following text wrapping properties are included in the grid:

 

Class

Member

Description

C1DataGrid

HeaderCellTextWrapping property

Defines a default text wrapping of grid column header captions.

C1DataGrid

ItemCellTextWrapping property

Defines a default text wrapping for grid item cell values.

C1DataGrid

TotalResultCellTextWrapping property

Defines a default text wrapping of grid column totals.

Column

ActualHeaderCellTextWrapping property

Gets an effective text wrapping of the column header caption.

Column

ActualItemCellTextWrapping property

Gets an effective text wrapping of column item cell values.

Column

ActualTotalResultCellTextWrapping property

Gets an effective text wrapping of a column total result.

Column

ItemCellTextWrapping property

Defines a text wrapping of column item cell values.

Column

HeaderCellTextWrapping property

Defines a text wrapping of the column header caption.

Column

TotalResultCellTextWrapping property

Defines a text wrapping of a column total result.

ContentCellPresenterBase

TextWrapping property

Gets cell's text wrapping.

 

 

Using the TextWrapping enumeration you can customize how grid context is wrapped by setting the above properties to WrapWithOverflow, Wrap, or NoWrap:

 

Option

Description

WrapWithOverflow

Line-breaking occurs if the line overflows beyond the available block width. However, a line may overflow beyond the block width if the line breaking algorithm cannot determine a line break opportunity, as in the case of a very long word constrained in a fixed-width container with no scrolling allowed.

Wrap (default)

No line wrapping is performed.

NoWrap

Line-breaking occurs if the line overflows beyond the available block width, even if the standard line breaking algorithm cannot determine any line break opportunity, as in the case of a very long word constrained in a fixed-width container with no scrolling allowed.


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.