Alessandro Del Sole's Blog

/* A programming space about Microsoft® .NET® */
posts - 159, comments - 0, trackbacks - 0

My Links

News

Your host

This is me! This space is about Microsoft® .NET® and Microsoft® Visual Basic development. Enjoy! :-)

These postings are provided 'AS IS' for entertainment purposes only with absolutely no warranty expressed or implied and confer no rights.

Microsoft MVP

My MVP Profile

I'm a VB!

Watch my interview in Seattle

My new book on VB 2015!

Pre-order VB 2015 Unleashed Pre-order my new book "Visual Basic 2015 Unleashed". Click for more info!

My new book on LightSwitch!

Visual Studio LightSwitch Unleashed My book "Visual Studio LightSwitch Unleashed" is available. Click the cover!

Your visits

Follow me on Twitter!

CodePlex download Download my open-source projects from CodePlex!

Article Categories

Archives

Post Categories

.NET Framework

Blogroll

Help Authoring

Microsoft & MSDN

Setup & Deployment

Visual Basic 2005/2008/2010

ottobre 2010 Blog Posts

WPF: text wrapping inside DataGrid cells

When working with the DataGrid in WPF, you generally use the DataGridTextColumn object for displaying or editing text. Such an object has a limitation: there is no property for specifying that the text should be automatically wrapped according to the column width, similarly to what you can do in Microsoft Excel. Fortunately the solution is pretty easy. In fact you can use the DataGridTemplateColumn element (a generic object which allows deep customizations for cell templates) and inside it you implement one TextBox for text editing and one TextBlock for displaying text; such controls expose the TextWrapping property that we can use for wrapping the text. Here's the...

posted @ giovedì 14 ottobre 2010 18:08 | Feedback (0) | Filed Under [ Visual Studio 2010 Visual Basic Windows Presentation Foundation ]

Powered by:
Powered By Subtext Powered By ASP.NET