Home  separator  Controls  separator  TextBlock
Bookmark and Share Share...    Subscribe to this feed Feed   About Christian Moser  

WPF TextBlock Control

How to change the line height within a TextBlock

To change the line hight within a TextBlock, you have to set the LineHeight to the desired height (in logical units) and also the LineStackingStrategy to BlockLineHeight, because otherwhise you will not see any effect.

<TextBlock Text="This is a 
multiline text." 
           LineHeight="25" LineStackingStrategy="BlockLineHeight" />

Last modified: 2011-02-21 12:16:22
Copyright (c) by Christian Moser, 2011.

 Comments on this article

Show all comments
Commented on 10.July 2011
Thanks alot, you tutorial is very helpful to me. It has help me with background knowledge of wpf. I have being browsing all around the msdn, but i coud'nt get a concise information with wpf. I am a php developer trying to add c# to my development kits. Thanks alot.
Commented on 19.July 2011
It is very good &amp; very useful to beginners to learn WPF from base.

E-Mail (optional)