programmatic textblock entry with linebreaks
Use Enviroment.NewLine
testText.Text = "Testing 123" + Environment.NewLine + "Testing ABC";
StringBuilder builder = new StringBuilder();
builder.Append(Environment.NewLine);
builder.Append("Test Text");
builder.Append(Environment.NewLine);
builder.Append("Test 2 Text");
testText.Text += builder.ToString();
You could just pass in newline \n
instead of <LineBreak/>
helpBlock.Text = "Here is some text. \n Here is \n some \n more.";
Or in Xaml you would use the Hex
value of newline
<TextBlock Text="Here is some text. 
 Here is 
 some 
 more."/>
Both results: