none
Word VSTO Ribbon DPI scaling artefacts RRS feed

  • Question

  • Hello,

    I am using VS2019 - C# - for creating a Word VSTO AddIn. I have created a Ribbon using XML. It looks fine on a HD monitor (scaling = 100%), but the buttons appear in the wrong location on a 4K monitor. I understand that this is a DPI scaling problem.

    I have been looking at DPI awareness, but can't find much about how to handle the MS Word Ribbon specifically.

    Does anyone know of a code example that properly handles DPI awareness for a Word VSTO AddIn with Ribbon XML.

    It would be very nice if Microsoft could include it in this explanation:

    https://docs.microsoft.com/en-us/visualstudio/vsto/walkthrough-creating-your-first-vsto-add-in-for-word?view=vs-2019

    or provide a code example here:

    https://docs.microsoft.com/en-us/office/client-developer/ddpi/handle-high-dpi-and-dpi-scaling-in-your-office-solution

    Kind regards,

    Niels van Strien

    Addition information: Others also report that at higher DPI settings, a different number of controls can be placed vertically in the ribbon, specifically three at 96 dpi and 2 at 125 dpi and higher. See this post:

    https://stackoverflow.com/questions/53652403/three-small-edit-boxes-no-longer-fit-on-the-same-columns

    Unfortunately the post doesn't provide a solution. Can it be considered a bug that the VSTO team can fix?

    Tuesday, February 25, 2020 9:09 AM