Using RichTextBox inside of RadWindow

2 posts, 0 answers
  1. Nelson
    Nelson avatar
    62 posts
    Member since:
    Apr 2011

    Posted 01 Jul 2011 Link to this post

    Hi telerik,

    I use in my app RadRichTextBox inside of RadWindow as UserControl.

    The problem is when I want load the Document Property of RichTextBox I can´t show anything.

    I did this:
    window.Header = "Edição de Templates Notificação";
    window.Width = 600;
    window.Height = 500;
    UserControls.SGAControloWord SGAWord = new UserControls.SGAControloWord();
    SGAWord.radRichTextBox1.Document = ImportHtml(((TemplatesNotificacoes)TemplateNotificacaoSeleccionada).ConteudoProp);
    window.Content = SGAWord.radRichTextBox1;

    And with this line (window.Content = SGAWord.radRichTextBox1;) is given an error: Value does not fall within the expected range
    When I do window.Content = SGAWord the Window contain the RichTextBox, but don´t show the document.

    Thanks in advance.
  2. Miroslav Nedyalkov
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 04 Jul 2011 Link to this post

    Hello Nelson,

     Is the class SGAControloWord an UserControl which contains the RadRichTextBox inside XAML? If yes, the operation you are trying to perform is not allowed in Silverlight, because the RichTextBox need to be removed from the visual tree before placing in another.

    If this is not the case, please send us a sample project that reproduces the issue - this will help us better understand the issue.

    Miroslav Nedyalkov
    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
Back to Top