我想ContentDialog用我的应用程序窗口调整大小,并使用托管窗口的大部分空间(比如 80%)。
我尝试使用以下代码来完成此操作,但它不起作用:
var windowSize = CoreWindow.GetForCurrentThread().Bounds;
ContentDialog cd = new ContentDialog();
{
Width = windowSize.Width * .8,
Height = windowSize.Height * .8,
Content = new NewEditPage(),
FullSizeDesired = true
}
await cd.ShowAsync();
我需要 ContentDialog 随窗口调整大小,这样如果用户缩小窗口,ContentDialog 应该更新以继续保持 80% 的高度/宽度。