Update and now alignment doesn't work

3 posts, 0 answers
  1. Bradley
    Bradley avatar
    16 posts
    Member since:
    Aug 2010

    Posted 25 Oct 2012 Link to this post

    I updated to the latest WPF Rad controls this morning and it seems to have broken a view things.

    I have a RichTextBox and some of the controls above it, like bold, italic, underline, etc. etc.  However after updating, all the alignment toggle buttons no longer work, they don't center, left, or right align the text in the document. I redownloaded the demos to see how it worked in there, and most of the code looks the same, except for in the code behind things like 

    document.PageViewMargin = new SizeF(10, 10);

    PageViewMargin isn't an option.
  2. Bradley
    Bradley avatar
    16 posts
    Member since:
    Aug 2010

    Posted 26 Oct 2012 Link to this post

    Ok so if I make the layout Paged or Flow it works fine, the problem is apparently with FlowNoWrap.  I can use Flow, the only issue with it is if you paste an image that is to big for the window size I want the horizontal scroll bar to show up.  Setting ScrollViewer.HorizontalScrollBarVisibility="Auto" doesn't provide this.

    On a different note, the performance with the new build is extremely slow in loading compared to the previous version.  My window took approximately 3 seconds before to load the control, do some file IO and some DB changes.  With the latest version, the IO and DB still take the same amount of time, but loading the rich text control takes about 5 seconds.  
  3. DevCraft R3 2016 release webinar banner
  4. Vasil
    Vasil avatar
    124 posts

    Posted 30 Oct 2012 Link to this post

    Hello Bradley,

    Thank you for reporting this issue. Indeed text alignment doesn't work for FlowNoWrap layout mode in 2012 Q3 version of RadRichTextBox. We have logged this issue for revision.

    As for the horizontal scroll when a large image is inserted in the document, it is true that it is not shown. In general, no horizontal scrollbars are used in Flow layout mode, but we will consider this case for revision.

    Regarding the performance, could you elaborate more on how you are using our control? Is it separated in a UserControl which is instantiated later? The initial delay might be caused by MEF, which RadRichTextBox uses to load the required types from the assemblies they are in. By default, it uses a catalog of all assemblies dependent on Telerik.Windows.Documents in the application directory which can be not so fast. Therefore, you could change the default catalog used by MEF by a one pre-filled with all the types that you want to use or empty (read more here) and also to use SatisfyImports() method.

    I hope this information was helpful. If not, please open a support ticket and attach a sample project illustrating the slow initialization of the rich text box. In this way, we could best address the issue and offer possible solutions.

    We have added points to your account for the bug report and the suggestions. Don't hesitate to contact us if you have other questions.

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top