25

I have a simple window and textbox, when i try to paste this code to the textbox

[Code]General           : sample.avi
Format            : AVI
Length            : 380 MiB for 16mn 57s 320ms

Video #0          : DivX 5 at 2994 Kbps
Aspect            : 1024 x 576 () at 25.000 fps

Audio #0          : MPEG-1 Audio layer 3 at 128 Kbps
Infos             : 2 channels, 48.0 KHz   [/code]

It stops after

[Code]General           : sample.avi

Why?

ThinkingStiff
  • 64,767
  • 30
  • 146
  • 239
Programista
  • 1,037
  • 5
  • 15
  • 38

4 Answers4

60

You need to allow your TextBox to accept newlines:

AcceptsReturn="True"
Joe Mancuso
  • 2,099
  • 1
  • 16
  • 17
8

Is the textbox set to accept new lines? Set these properties to the textbox:

TextWrapping="Wrap" //Wrap text within the text box
VerticalScrollBarVisibility="Visible" //If you want scroll bars
AcceptsReturn="True" //This does the magic.
3

Make sure to allow multi-line by:

TextWrapping="Wrap" VerticalScrollBarVisibility="Visible" AcceptsReturn="True"

Mohamed Abed
  • 5,025
  • 22
  • 31
2

I probably spent a good hour or two on this. Ugh. I finally noticed that the paste was stopping at a paragraph (i.e., newline). This insight allowed me to Google to something useful (this answer). Need keywords C# Paste Truncated Incomplete Newline or somesuch. I used C# years ago, and didn't have this issue. Thanks

Bruce
  • 121
  • 3