I have an email feature in my app. So i have added the \t\t so that there is a tabbed space between the first date and the value. This appears fine in the device too. But when the email is received, there is just one space between the strings and it is not tabbed. Hence the data does not appear in columns but jagged. Is there any method by which i can achieve the same look in the email received? How can i format text in EmailComposeTask
?
string test = "";
strheading = "heading";
for (int j = 0; j < pCycMan.GetWeightCount(); j++)
{
test= test+ pCycMan.GetWeightDateByIndex(j).ToString("dd-MMM-yyyy") + "\t\t" + pCycMan.GetWeightByIndex(j) + "\n";
}
var emailComposeTask = new EmailComposeTask
{
To = "emailid",
Subject = "tezt",
};
emailComposeTask.Body = strheading + test;
emailComposeTask.Show();
EDIT :- I also tried the following code inside the for loop which did not work.
string temp2 =pCycMan.GetWeightByIndex(j);
StringBuilder sb = new StringBuilder(pCycMan.GetWeightDateByIndex(j).ToString("dd-MMM-yyyy"));
sb.Append("\t");
sb.Append(temp2);
sb.AppendLine();
weight = weight + sb.ToString();