2013-02-08 145 views
0

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

// 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; 

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

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

在此先感谢。

回答

0

我有类似的问题。它发生是因为浏览器中的比例高于100%。

相关问题