Binding/Loading Data Into RichTextBox (or other control) RRS feed

  • Question

  • I need to implement a control in my project that will load a text or data file of some sort that can include the following:
        -Hyperlinks within the text (such as "Back to Top")

    My first question is what control do I use and how do I code pictures and hyperlinks into it?  My first instinct is using a RichTextBox but if something else would work better please enlighten me.  Also, how can I code buttons to load different text files (or other data files) into the control?  Thanks in advance for any input.
    Tuesday, September 9, 2008 9:50 PM

All replies

  •  Howdy,

    For this particular requirement, I would be looking to add the content into a page element and then load it into the Frame element inside your WPF app.

    You will also see that the Frame has a NavigationUIVisibility property which will allow you to work with the navigation between documents etc.

    This link will tell you about the Frame element:

    and this one will tell you about the XAML page element:


    Expression MVP

    Learn Expression Blend at learnexpressionstudio.com

    my blog : http://x-coders.com/blogs/sneaky/default.aspx

    Thursday, September 11, 2008 10:07 AM
  • I'm having trouble now adding a page element as a child of the frame element.  The XAML code for adding a frame comes up as:

    <Frame Margin="142,120,103,54" Content="Frame"/>

    I have not, however, had any success adding a page to that.  Once that is done, how do I load my content into the page or frame and what data type should I use (ie, HTML?).  I assume HTML would be the easiest to work with for my requirements above but is there another (or better) way?

    The way I understand it, I should create a Frame element with a Page (or multiple pages) child then use the page to load the content I want shown?  It should be noted as well that the content to be presented in the Page is dictated by whatever button a user presses.  How can I get this all to work?  I'm puzzled as to where to start and what to start with.. :/

    • Edited by neo991lb Thursday, September 11, 2008 4:44 PM Added picture
    Thursday, September 11, 2008 4:39 PM
  • Should I be adding these (frame, page) directly to the code behind files?  Sorry I am still so lost :(
    Monday, September 15, 2008 2:36 PM