Scale factor

7 posts, 1 answers
  1. Marco
    Marco avatar
    21 posts
    Member since:
    Aug 2010

    Posted 02 Feb 2011 Link to this post

    How can I set the document zoom size programatically? I'm using:

      <telerikEditor:RadRichTextBox IsSpellCheckingEnabled="False"  Grid.Row="0"  x:Name="EditorPrint" IsReadOnly="true" Margin="12" BorderThickness="1" BorderBrush="Black" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"  Visibility="Collapsed" IsContextMenuEnabled="False" />
            <telerik:RadRichTextBoxStatusBar Grid.Row="1" AssociatedRichTextBox="{Binding ElementName=Editor, Mode=OneTime}" ScaleFactor="0.75,0.75" />

    But it never scales the document to 75%. Always starts at 100% and then I have to manually use the scale option to resize the document. Am I doing something wrong? Can it be done programatically? Do I have to call updatelayout or something?

    Thanks.

  2. Answer
    Boby
    Admin
    Boby avatar
    595 posts

    Posted 03 Feb 2011 Link to this post

    Hello Marco,
    The way to achieve this is to set the ScaleFactor property of RadRichTextBox:
    <telerik:RadRichTextBox Name="radRichTextBox1" ScaleFactor="0.7,0.7" Grid.Row="1"/>
    or in code-behind:
    this.radRichTextBox1.ScaleFactor = new Size(0.75, 0.75);
    However, there is a bug in RadRichTextBoxStatusBar that causes status bar's combo box to show incorrect value when value of 75% is used (the value is applied to RadRichTextBox properly).  It should be fixed in one the following LIBs (Latest Internal Builds). As a temporary workaround you could use any other value different from 75%.

    Don't hesitate to contact us if you have other questions or if this doesn't fit your needs.


    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. DevCraft banner
  4. Marco
    Marco avatar
    21 posts
    Member since:
    Aug 2010

    Posted 03 Feb 2011 Link to this post

    Thank you very much.
  5. codputer
    codputer avatar
    45 posts
    Member since:
    Apr 2007

    Posted 23 Apr 2011 Link to this post

    I'm having an issue with RadRichTextBoxStatusBar, please see the attached jpg's.

    It's a small issue, but one that the client noticed.  It should have enough room, the control is housed within a user control that is then embedded into another User control. 

    Any ideas?

    Regards,
    Richard
  6. Boby
    Admin
    Boby avatar
    595 posts

    Posted 27 Apr 2011 Link to this post

    Hi Richard,

    The problem comes from the Summer theme you are using for your application. One option should be to edit the control's template directly. I am attaching a sample project that demonstrates this approach.
    We will fix this issue for the next release.  I added some Telerik point to your account in appreciation for your cooperation.

    Best wishes,
    Boby
    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
  7. homer
    homer avatar
    3 posts
    Member since:
    Feb 2012

    Posted 23 Apr 2012 Link to this post

    Without knowing the scale factor required to get the document to fit, Is there any way to simply scale the document to the size of the RadRichTextBox ? 

    If only a portion of the document contains content.  Is there a way to only display the part of the document that contaisn the content in the RichTextBox rather then the complete document.  What I am trying to do is create a label in the top corner of the document and then display only that part of the document rather then the whole document with only the top corner containing content - but scaled to the size of the textbox that is displaying it.

    Also, I am getting a shadowed border around my document in the RadRichTextBox as is displayed in the RichTextEditor.  Is there any way to get remove that ?  That is fine in the RichTextEditor I would prefer that document margin not be visible when displayed in the RadRichTextBox.
  8. Boby
    Admin
    Boby avatar
    595 posts

    Posted 26 Apr 2012 Link to this post

    Hello D O'Neill,
    You could consider using RadRichTextBox in Flow layout mode, where you won't have margins and borders around the pages, and will be able to fit the content to the box by just using RadRichTextBox.ScaleFactor property. In paged layout mode, you should also use RadRichTextBox.HorizontalOffset and RadRichTextBox.VerticalOffset properties to move the content inside the view port. In this case, you can remove the page border shadow by editing the page template.

    Greetings,
    Boby
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
DevCraft banner