Walter Fabio Simoni
Walter Fabio Simoni

Reputation: 5729

WPF : Text loaded in a Wpf textbox is cutted ( not entire )

I'm trying to load a text ( as a string ) in a wpf textbox.

string str;
string = myFunction();
textBox.Text = str;

Here's my XAML :

 <TextBox Height="174" Name="textBox1" Width="811" TextWrapping="Wrap" />

My TextBox result is not entire. I trye to write the str in a file on my disk, and the file contains all my data.

Anyone have some idea ?

Thanks a lot,

Upvotes: 1

Views: 107

Answers (1)

Grant Winney
Grant Winney

Reputation: 66499

You've constrained the size of the TextBox, so if you have too much text you won't be able to see it all.

Remove the constraints, or specify a VerticalScrollBarVisibility value:

<TextBox Height="174" Name="textBox1" Width="811" TextWrapping="Wrap"
         VerticalScrollBarVisibility="Auto" />

enter image description here

Upvotes: 1

Related Questions