Keep popup within window bounds

前端 未结 2 1293
粉色の甜心
粉色の甜心 2021-01-14 23:06

I\'m trying to display a popup under a button.

This is what it looks like now :

\"enter

2条回答
  •  一个人的身影
    2021-01-14 23:52

    You could use a combination of SystemParameters.PrimaryScreenHeight and the top-left point of the Popup to calculate how much room you have, and set that as the MaxHeight and MaxWidth of the Popup's contents.

提交回复
热议问题