Hi,
Is it possible to have a TextBlock without the space arround the text (the space from the LineHeight etc.) What I am interested in is to display a text on one line and the bounds to exactly contain the content text.
Thank you,
Valentin
Hi,
Is it possible to have a TextBlock without the space arround the text (the space from the LineHeight etc.) What I am interested in is to display a text on one line and the bounds to exactly contain the content text.
Thank you,
Valentin
TextBlock without space
naru
I need a control in which the text just "fits". TextBlock contains space for descenders, ascenders etc., but I would need something that changes its height according to the content text e.g. if there are no characters with descenders in the text, the height will be measured from the baseline.
I think I would need to implement a custom control and use FormattedText and its Extent property.
Thank you for your help,
Valentin
Treval_Lightner
Correct, in this case you're probably best off implementing your own custom layout.
Filipe
G1
Does setting the LineHeight to be equal to the FontSize do what you expect
If not, could you give more details around your request. Do you want a rectangle that includes descenders (i.e. the lower portion of a lowercase g) One that includes swashes (OpenType feature for decoration that draws strokes outside the bounds).
Thanks.
--
Filipe Fortes
http://fortes.com/work