WPF toolkit datagrid cell text wrapping

前端 未结 3 636
忘掉有多难
忘掉有多难 2021-01-18 11:32

My WPF datagrid\'s columns are fixed width, which means long text in the rows are cut off. How can I have the text wrap?

3条回答
  •  暖寄归人
    2021-01-18 12:07

    If you are using a DataGridTextColumn, you need to define the Style for the DataGridTextColumn.ElementStyle

    
      
        
      
    
    

    Full explination can be found at the following http://msdn.microsoft.com/en-us/library/system.windows.controls.datagridtextcolumn(v=vs.95).aspx

提交回复
热议问题