How to detect that text has created new lines

1

Let's imagine I have a lable and have a text with n characters. Whenever this text does not fit it will put the words on the bottom line. How do I detect that this happened?

I tried it that way

    internal int ContarQuebrasLinhas()
    {
        return LBLNomeEvento.Text.Split('\n').Length;
    }

This works when I'm the one doing this break.

lable.Text = "aaaaa\naaaaa";

I will now show you the image of how it would appear

As it does not fit on the same line it does line break

    
asked by anonymous 27.08.2018 / 15:56

0 answers