0

I have an VSTO Outlook Add-in. This Add-in consists on a custom task pane that is placed at the top. Due to new vertical Outlook pane for Apps which appears on the left and which is currently overlapping with the left side of my custom task pane (it looks like it is a bug from MS and they are working on fixing it), I have to shift the custom task pane title and content (user control) to the right by applying a margin on the left side.

To shift the custom task pane title more to the right, I set some white spaces to the title as a prefix. The problem is that when I change the screen resolution and/or scale from the OS, the title is shifted the right depending on the screen resolution and/or scale selected.

I don't know if it is due to the extra white spaces that I put as a prefix to the title that when scaling and changing screen resolution behaves in this abnormal way.

How can I get the title to always remain/keep in the same position and keeping the same left margin always the same?

UPDATED:

Example: This is my custom task pane, as you see the new vertical Outlook pane for Apps overlaps the left side of the custom task pane (and the ctp title is cut):

enter image description here

To solve this issue I decide to move the title and wpf user control more to the right. I apply some white spaces as a prefix for the title, the string now is:

"               This is a demo title"

And the result is below:

enter image description here

Now I change the scale from 100% to 200% from the OS and see that the title is shifted more to the right (it does not keep in the same position):

enter image description here

Willy
  • 9,848
  • 22
  • 141
  • 284
  • Any screenshots? Are you able to reproduce the issue with a newly created empty add-in project? What is the exact caption string? – Eugene Astafiev Feb 18 '23 at 17:52
  • @EugeneAstafiev I have updated my post with some screenshots. In the last one, after changing scale from 100% to 200% see houw the title in the custom task pane has been shifted a little to the right, not maintaining its initial position. – Willy Feb 18 '23 at 18:37
  • Does it show the title correctly when you start the string with any symbol? – Eugene Astafiev Feb 19 '23 at 19:02
  • @EugeneAstafiev The problem are the white spaces in front of the title string. IIf I start the title string with any other character rather than the white space, then it works, i mean, it is respecting the left margin and remains in the same position regardless the screen resolution and/or scale I set from OS. So the problem is when using a title string that begins with some white spaces. But then how can I move the title string more to the right? is there any alternative invisible character to the white space which is not affected by the scaling operation? – Willy Feb 19 '23 at 19:35
  • @EugeneAstafiev I need to move the ctp title more to the right to avoid it to get overlapped by the new vertical Outlook pane for Apps in the left side. It looks like white spaces are not correctly interpreted by the scaling operation. – Willy Feb 19 '23 at 19:37

0 Answers0