MSWord Example DocumentModelTreeViewer Question

5 posts, 0 answers
  1. Jamie
    Jamie avatar
    12 posts
    Member since:
    Aug 2010

    Posted 08 Feb 2011 Link to this post

    I am looking at the MS Word example of the RadRichTextBox and was implementing the Document Structure button under the view tab and saw that the following code in the example for the DocumentStructure Click Event.

    private void ViewDocumentStructure_Click(object sender, RoutedEventArgs e)
            {
                RadWindow window = new RadWindow();

                DocumentModelTreeViewer documentTreeViewer = new DocumentModelTreeViewer();
                documentTreeViewer.DisplayDocumentLayoutTree(this.editor.Document);

                window.Content = documentTreeViewer;

                window.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
                window.Width = 600;
                window.Height = 750;

                window.ShowDialog();
            }


    I am wondering where DocumentModelTreeView comes from. When I search this on this website nothing comes up. When I search on Google, nothing comes up...Where is this coming from?


    Edit: I am referencing the MSWordExample.xaml.cs file from http://demos.telerik.com/silverlight/#RichTextBox/MSWord.
  2. Boby
    Admin
    Boby avatar
    763 posts

    Posted 09 Feb 2011 Link to this post

    Hi Jamie,
    DocumentModelTreeViewer is a custom class that we use only in the demos - you can view its source code
    in the samples solution installed with the controls - basically it presents document structure as a tree.
    If you want to create full featured editing UI, you can look at our blog post describing how to do that using the Visual Studio designer - it is not nessesary to reference MSWordExample user control.

    Don't hesitate to contact us if you have other questions.

    Kind regards,
    Boby
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. Angeli
    Angeli avatar
    29 posts
    Member since:
    Apr 2011

    Posted 25 May 2011 Link to this post

    Hello. Where can i exactly find the source code in the samples solution installed with the controls?
  4. Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 25 May 2011 Link to this post

    Hello Angeli,

    If you had installed the controls in the default path, the code of the tree viewer must be at the following location:

    C:\Program Files (x86)\Telerik\RadControls for Silverlight Q1 2011\Demos\Examples\RichTextBox\DocumentTreeViewer

    For reference, the Binaries folder is also located in the folder:
    C:\Program Files (x86)\Telerik\RadControls for Silverlight Q1 2011\

    I hope this helps.


    All the best,
    Iva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Angeli
    Angeli avatar
    29 posts
    Member since:
    Apr 2011

    Posted 25 May 2011 Link to this post

    Thank you!
Back to Top