Header TextWrap in WPF GridDataControl


The Grid WPF team has created this sample to show how TextWrap can be applied to the Header row of the Grid.

Download sample: WPF_GDCHeaderWrap

this.grid.ModelLoaded += (s, a) =>
    this.grid.Model.HeaderStyle.TextWrapping = TextWrapping.Wrap;
    this.grid.Model.HeaderStyle.TextTrimming = TextTrimming.None;
    this.grid.Model.ResizeRowsToFit(GridRangeInfo.Row(0), GridResizeToFitOptions.None);

GridDataControl with header TextWrap


Comments (1) -

  • love this
    Aug 23, 2012

    Hey there from across the ocean! This is just what I was looking for, and you wrote it nicely. Thank you