C#: Anchored Panel won't resize properly

后端 未结 3 1309
有刺的猬
有刺的猬 2021-02-05 06:10

I\'ve a strange problem regarding auto sizing of a panel in a user control. This panel is anchored to all 4 sides of the user control. But the anchoring not always works as it s

3条回答
  •  误落风尘
    2021-02-05 07:10

    You have talked about both "anchor" and "dock", which can serve similar purposes but act differently. Your problem may be that you are trying to do both, and this is interfering with the behavior you want. If not, perhaps try switching from the one to the other.

    It sounds like you've double checked the ansectery of the control, but did you examine it with: View->Other Windows->Document Outline (a very handy tool I only recently discovered)?

    Finally, while it doesn't directly solve your problem, it sounds like you have a very complicated UI, and your users may benefit if you were to spend some time to consider if you could simplify the UI. Of course, I don't know your users or the purpose of the app, and what you have may be the best, but it sounds like it might be time to ask this question.

    Good luck.

提交回复
热议问题