locked
How to add new line while sharing text in WinRt RRS feed

  • Question

  • I want to share some text using mail client, in which I want to display new line. It displays it correctly in notepad on using \r\n but doesn't work with the SetText function inDataTransferManager. How to do so?
    Wednesday, December 26, 2012 2:11 PM

Answers

  • its a known bug that i already repported during the RP, sadly still not solved... i use now html to work around

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    • Proposed as answer by John Louros Saturday, March 30, 2013 6:16 PM
    • Marked as answer by Milan Aggarwal Monday, August 26, 2013 3:20 PM
    Saturday, March 30, 2013 5:58 PM

All replies

  • emails are html so you would need to use <br/>  for a new line in an email
    Wednesday, December 26, 2012 2:23 PM
  • Hi, Thanks for your reply. `<br/>` would be useful if I attach the text as html content to the sharing task. What if I want to attach it as plain text?
    Friday, January 11, 2013 4:34 AM
  • I have exactly the same question? Any solution yet? Or do we have to use HTML?
    Saturday, March 30, 2013 4:57 PM
  • its a known bug that i already repported during the RP, sadly still not solved... i use now html to work around

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    • Proposed as answer by John Louros Saturday, March 30, 2013 6:16 PM
    • Marked as answer by Milan Aggarwal Monday, August 26, 2013 3:20 PM
    Saturday, March 30, 2013 5:58 PM
  • I managed to get this working by setting a string:

    I know that it's HTML, but shouldn't Environment.NewLine work anyway?

    If <br /> and \r\n isn't working, what about:

    string stuffToBeShared = "<p style=\"margin-top:10px;\">" + someStringHere + "</p>";

    Monday, April 1, 2013 12:41 PM