c# - Check if TextBlock has Multiple Lines -


I have a TextBlock , which I want to be as big as possible without several lines. I need to see if it flows on the next line so that I can reduce the size of the text. I can not set the maximum line for 1, because after this it will cut my text, how can I see that many rows are being used in my TextBlock ?

In a way I was thinking, but could not understand, something like this is:

  if (TextBlock.Text.Width> TextBlock.Width)   

or

  If (TextBlock.Height> TextBlock   

but this does not seem like what I have seen.

I agree with a little comment, but if you want to do this, you will see a view box You can use controls and insert the text block inside it.

   

  

Comments

Popular posts from this blog

c# - Textbox not clickable but editable -

Matlab transpose a table vector -

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -