Anchor not work during changing text size to 125%

4 posts, 0 answers
  1. Peter Bogoyavlensky
    Peter Bogoyavlensky avatar
    20 posts
    Member since:
    Feb 2009

    Posted 14 Dec 2011 Link to this post

    I am using Win7 system and latest build of Telerik package (2011.3 11.1116 - Nov 16, 2011).

    I've made two similiar forms - using ordinary WinForm components (see f-100.png attached) and Telerik form (see t-100.png). No one Telerik theme was used.

    When I change text size to 125% - these forms look like that:

    a) Ordinary WinForm's form looks fine as expected - see f-125.png.

    b) But Telerik form has different behavior (see t-125.png):

    • GroupBox with anchored position comes out of border (groupbox with dock position has appropriate size).
    • Treeview with anchored position do not resized at all (treeview with dock position has appropriate size).
    • Buttons and textbox do not resized (to reflect change of text size) and their anchor position do not work.

    I presume that other controls also have problems with anchoring position and resizing.

    Note that Telerik form painted fine if we use 150% for changing text size (see t-150.png). Only 125% has that bug (actually, there are some interval from 120% to 135%, something like that).

    Should I change something in code to prevent this (I mean, using dock position is not applicable all the time)?
  2. Jack
    Jack avatar
    2333 posts

    Posted 16 Dec 2011 Link to this post

    Hi Peter Bogoyavlensky,

    Thank you for contacting us.

    I can confirm this issue. Currently, there is an issue when using custom DPI settings with XP-style scaling enabled. We know about this limitation and we will address the issue in one of our upcoming releases.

    You should disable the XP-style scaling to solve the issue. Please follow these steps when using a Windows 7 PC:

    1. Right click on the desktop and select Personalize.
    2. Select Display.
    3. Choose Set custom text size (DPI).
    4. Uncheck the "Use Windows XP style DPI scaling" checkbox and click OK.

    * Please note that the system may require a logout.

    Another option will be to remove the following lines from your Designer.cs file:
    this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

    However, this does not guarantee that your form will look OK in all cases.

    Should you have any other questions, please do not hesitate to contact us.
    the Telerik team

    Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.

  3. UI for WinForms is Visual Studio 2017 Ready
  4. Lars
    Lars avatar
    1 posts
    Member since:
    Feb 2011

    Posted 05 Feb 2014 in reply to Jack Link to this post

    From the previous posts, it seems like a old problem that I've ran into.
    Any news on a solution?
    regards Lars
  5. George
    George avatar
    500 posts

    Posted 10 Feb 2014 Link to this post

    Hello Lars,

    Thank you for contacting us.

    This problem is very common among WinForms. Currently, a 100% working solution does not exists. There are numerous discussions in the forums which give different possibilities to create a DPI-Aware application and may be of help in your case. You can read some of them here:

    I hope this information will be helpful. Do not hesitate to write, should you have further questions.


    Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).

Back to Top