0

When I set the height of the custom task pane (which is in points), this height includes the titlebar or not? Microsoft does not tell anything about it, I doubt if the height refers only to the content, I mean, the user control, or also it takes into account the custom task pane title bar. Could someone confirm this, please?

For example, if I set the height to 80 points, does it includes the titlebar? or not (only the user control height)?

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
Willy
  • 9,848
  • 22
  • 141
  • 284

1 Answers1

1

Yes, the Size (Height or Width) of custom task panes includes the title bar. This is for the whole task pane.

If you need to know the client area you may check out the Size property of the user control placed there.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
  • Ok,thanks for confirming it. My problem was that I needed to set the height of the custom task pane, only its content - without taken into account the title bar - to 48 points so when I initially set it using ctp.Height I don't know which value to assign to it (48 + ?), I don't know what it is the height of only the title bar. – Willy Nov 02 '22 at 13:55
  • Try to set the height to a lower value and then check the results, following that way you will find the answer. – Eugene Astafiev Nov 02 '22 at 14:09