Rich Text Box formatting

7 posts, 0 answers
  1. vikas
    vikas avatar
    11 posts
    Member since:
    May 2011

    Posted 28 Jul 2014 Link to this post

    Hi Team,
    I am using RichTextBox in my project. All they keyboard controls work fine. But I want to give a toggle button for bold, italics and underline, so that the user can click on bold and make the text bold.

    Can you please help me in this regard.
  2. Martin
    Martin avatar
    17 posts
    Member since:
    May 2014

    Posted 28 Jul 2014 in reply to vikas Link to this post

    You can find an example in the XAML SDK. More specifically you should take a look at the RichTextBox - GettingStarted example.
  3. UI for WPF is Visual Studio 2017 Ready
  4. vikas
    vikas avatar
    11 posts
    Member since:
    May 2011

    Posted 28 Jul 2014 in reply to Martin Link to this post

    Hi,
    Can you please tell me as to how I can download the files.
  5. Martin
    Martin avatar
    17 posts
    Member since:
    May 2014

    Posted 28 Jul 2014 in reply to vikas Link to this post

    You can browse the files online, use a Git client or go to the main page of the XAML SDK and click the "Download ZIP" button on the right.
  6. Petya
    Admin
    Petya avatar
    975 posts

    Posted 28 Jul 2014 Link to this post

    Hello,

    @Martin, thanks for taking the time to help the community out. We highly appreciate it.

    @vikas, other than the SDK example Martin pointed you to, you could check the help article the project is related to here. Also, the SDK examples are easily accessible through the Samples Browser which you can download from here. Information about the browser is available in the Introducing WPF SDK Samples Browser blog post.

    Regards,
    Petya
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  7. vikas
    vikas avatar
    11 posts
    Member since:
    May 2011

    Posted 30 Jul 2014 in reply to Petya Link to this post

    Hi,
    I was able to download the sample and explore. Thanks for that .

    But, in my case i am a giving window to set header and footer which in turn will get applied to a PDF document.
    So, when the user sets formatting to text, how can i save it to database which can be used to apply to PDF document later.
    Thanks,
  8. Petya
    Admin
    Petya avatar
    975 posts

    Posted 31 Jul 2014 Link to this post

    Hello,

    You can import/export the content of RadRichTextBox using the format providers that come with the control. The Import/Export article in our documentation provides more details on that, as well as some code examples.

    Alternatively, you can use one of DataProviders which wrap the format providers to bind the content of your editor to a property in your view model. There is an example of this approach in the SDK examples (also available here).

    I hope this helps.

    Regards,
    Petya
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top
UI for WPF is Visual Studio 2017 Ready