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 |
HeaderCellTextWrapping property |
Defines a default text wrapping of grid column header captions. | |
ItemCellTextWrapping property |
Defines a default text wrapping for grid item cell values. | |
TotalResultCellTextWrapping property |
Defines a default text wrapping of grid column totals. | |
ActualHeaderCellTextWrapping property |
Gets an effective text wrapping of the column header caption. | |
ActualItemCellTextWrapping property |
Gets an effective text wrapping of column item cell values. | |
ActualTotalResultCellTextWrapping property |
Gets an effective text wrapping of a column total result. | |
ItemCellTextWrapping property |
Defines a text wrapping of column item cell values. | |
HeaderCellTextWrapping property |
Defines a text wrapping of the column header caption. | |
TotalResultCellTextWrapping property |
Defines a text wrapping of a column total result. | |
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. |
|