0

ChildWindow在我的应用程序中使用普通的 Silverlight。当调整浏览器窗口的大小时,特别是当它的宽度小于子窗口的宽度时,子窗口的边缘会被裁剪,因此无法通过关闭按钮关闭它,因为它不再可见。我尝试了许多解决方法,但没有任何帮助。特别是我已经订阅SizeChanged了子窗口的事件,并设置了相对于布局根的大小的大小。这是SizeChanged事件处理程序的代码:

// Get the dimensions of the application screen
Size appSize = Application.Current.RootVisual.RenderSize;
// Make the child window occupy the 90% of width and 40% of height of the entire screen
this.Width = appSize.Width * 9 / 10;
this.Height = appSize.Height * 4 / 10;

这段代码修改了子窗口的大小,但同时也更新了叠加层的大小,使其不再覆盖整个页面,这是一个很奇怪的行为。

有没有人遇到过这种问题?请分享任何想法。

提前致谢。

4

1 回答 1

0

我有一个类似的问题。发生这种情况是因为浏览器中的比例高于 100%。

于 2013-07-01T02:43:55.400 回答