locked
How to get Rich Edit Box Text in c#..? RRS feed

Answers

  • Hi Arjun,

    For getting the whole text, you could use:

    string txt= "";
    richtextbox.Document.GetText(Windows.UI.Text.TextGetOptions.None, out txt);

    Or the selected Text:

    var selected = rtb.Document.Selection;

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by ArjunShrivatsa Thursday, January 16, 2014 12:24 PM
    Thursday, January 16, 2014 11:26 AM
    Moderator