views:

94

answers:

1

In silverlight, if a TextBox AcceptsReturn, all newlines are \r, even though Environment.Newline is \r\n. Why is this? (WPF has \r\n as newline for textbox)

+1  A: 

I think because of compatibility with other operating systems.

Silverlight is available on linux and mac operating systems. Both (and most) of these OS's is unix based and unix uses '\r' for new lines. (as far i know only MS using the '\r\n')

While looking framework source code seems like MS developers mostly used to type '\r\n' instead of using Environment.NewLine.

Ertan