Font Scale (DPI)

4 posts, 0 answers
  1. Mateusz
    Mateusz avatar
    11 posts
    Member since:
    Jul 2012

    Posted 09 Dec 2014 Link to this post

    Hi,

    I use TSSP file that changes the appearance of the entire application.
    There is a problem with the appearance when the user has different font scaling setting in Windows (120 DPI).
    Due to the nature of the project I need to get the same appearance of the application, regardless of the DPI.
    So using VisualStyleBuilder I changed the font size from the point value to the pixel value (Segoe UI; 8,25pt => Segoe UI; 11px).
    In Annex, you can see the result.
    Font has the same size. But the size of the control type CommandBarButton is strange. It looks as if I set the padding (but padding is 0 for all).
    How to get rid of the padding?
    For other types of controls do not see this behavior.
  2. Mateusz
    Mateusz avatar
    11 posts
    Member since:
    Jul 2012

    Posted 09 Dec 2014 in reply to Mateusz Link to this post

    Edit: Annex.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Mateusz
    Mateusz avatar
    11 posts
    Member since:
    Jul 2012

    Posted 09 Dec 2014 Link to this post

    Edit: Uploading png file not working so here http://imgur.com/iIuJAwj
  5. Dimitar
    Admin
    Dimitar avatar
    1415 posts

    Posted 12 Dec 2014 Link to this post

    Hello Mateusz,

    Thank you writing.

    It appears that the text is not aligned properly in this case. You can set the alignment like this:
    commandBarButton1.TextAlignment = ContentAlignment.MiddleLeft;

    Could you please try that and and let me know how it works on your side?

    I am looking forward to your reply.
     
    Regards,
    Dimitar
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top