When the keyboard shows, the ContentDialog
will adjust its height automatically. And this will cause the change of ContentDialog
's Content's height. So when the keyboard shows, the Content's height becomes small and the rest of the Content is blocked.
If you want the keyboard shows without distorting the general shape, you can set the MinHeight
property of ContentDialog
. For example, you can give ContentDialog
a large MinHeight
like "500"
<ContentDialog x:Name="contentDialog" MinHeight="500" />
Or
contentDialog.MinHeight = 500;
After this, when the ContentDialog adjust its height, its height will be 500 at least and if this height is large enough, it will not distort the general shape. You may set the MinHeight
equal to ContentDialog's default height to make sure it's large enough.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.