Hi,
at first sorry for my bad english. Iam from Germany and im new at the programming with c# and to use PDFsharp.
At the moment i get some Items/Values from a ListBox. The user has the chance to select more then one item.
This is my code to print the String. My Problem is: When i selected more then one Item from the Listbox he write all Items in one line.
How can i get an line break?
Code:
foreach (object selectedItem in listKompetenz.SelectedItems)
{
DataRowView dr = (DataRowView)selectedItem;
String result = dr["kompetenz"].ToString() + "\n";
string kompetenzItem = result + "\n";
tf.Alignment = XParagraphAlignment.Left;
tf.DrawString(kompetenzItem + "\n", font, XBrushes.Black, new XRect(40, 320, 500, 300), XStringFormats.TopLeft);
}
Thank you very much for your help!
Greetings
Sascha