473,387 Members | 1,313 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

wpf - add newline


I'm trying to create the equivalent of a textbox which could format
different kind of "values" using a string.
Currently i can do this: (myObject is an ItemsControl)

The value of abc is:
<SomeHandler DataContext="{Binding abc}">
The value of def is:
<SomeHandler DataContext="{Binding def}">

A TemplateSelector is used to transform each element into a TextBlock,
and a WrapPanel is used to layout the textblocks, so that resizing the
window keeps all textblocks displayed to user, like a the text in a
web browser.

My question is: how can I do to insert NewLines manually ? Web
browsers have an auto wrap feature, but they also include <br /tags.
What's the easiest way to implement this ? And if it is not posible,
any idea i could do this with or without breaking my code ?

Thanks in advance.
Jun 2 '08 #1
0 1343

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: S. Staats | last post by:
Good day, everbody. Here is a simple program called test.py: #!/usr/bin/python print "No newline, please.", # End of program Here is what program does: prompt> ./test.py No newline, please.
by: Alan Mackenzie | last post by:
To all those who use (X)Emacs's CC Mode to edit C, C++, Java, Objective-C, Pike, AWK or IDL: To help direct the development of CC Mode, it would be useful to find out how people use the...
by: Vamsi | last post by:
Hi, I am trying a basic opearation of splitting a multiline value to an array of single lines(Actually making Address into AddressLine1, AddressLine2). I used Environment.NewLine in split, I...
by: Kaka | last post by:
Hi, I am a learner for C# and .Net. I want to know how to put a line break to a string so that when it show in the textbox the text will be displayed in saperated lines. e.g.: String s; s...
by: runningdog | last post by:
Hi, I would like to be able to embed a newline in a text string. Is there any convienent notation to do this TIA Steve
by: Alex Nordhus | last post by:
I am looking for a way to strip the blank line and the empty newline at the end of the text file. I can get the blank lines removed from the file but it always leaves the end line (which is blank)...
by: Peter Kirk | last post by:
Hi I would like to ask a little bit about the value Environment.Newline: what is it and what is the point of it? Ok, I can see in the docs that it represents "newline" for the current platform -...
by: Adam Right | last post by:
Hi, Is there a way to construct the mail body including newline characters by using .net framework mailing functions when sending an email? I cannot insert newline character into the body of the...
by: rossum | last post by:
I want to declare a const multi-line string inside a method, and I am having some problems using Environment.NewLine. I started out with: class foo { public void PrintStuff() { const...
by: linq936 | last post by:
Hi, I read in many places that the string to be outputted by printf() must be ending with newline, for example, it should be printf("Hello World.\n"); instead of printf("Hello World.");
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.