let's say that we have a multiline TextBox
into which a collection of Lines
is added. TextBox
has a VerticalScrollbar
enabled so that it activates when the text content is too big for actual size of the TextBox
.
By default, Size
of TextBox
is fixed.
Now, when text content bigger/longer than the TextBox
area is loaded into TextBox
I need to obtain the actual Height
of the TextBox
for currently displayed text content (Height which should allow to display the whole content without need of use the scrollbar).
TextBox
has WordWrap
enabled.
How can we do that?