Sunday, 15 September 2013

WPF datagrid text wrap for all columns -



WPF datagrid text wrap for all columns -

i know how wrap text in datagrid 1 column .. how can in project ... ... code ...

<datagrid name="datagrid1"> <datagrid.columns> <datagridtextcolumn width="*" header="person" binding="{binding path=person}" > <datagridtextcolumn.elementstyle> <style> <setter property="textblock.textwrapping" value="wrap" /> </style> </datagridtextcolumn.elementstyle> </datagridtextcolumn> </datagrid.columns> </datagrid>

paste code in app.xaml. style default applied grid.

<application.resources> <style targettype="datagrid"> <setter property="textblock.textwrapping" value="wrap" /> </style> </application.resources>

wpf datagrid

No comments:

Post a Comment