0

I am using ordinary Silverlight ChildWindow in my application. When resizing the browser window, in particular when making its width smaller than that of the child window, the edges of the child window get cropped, so that it is impossible to close it via the close button as it is no more visible. I have tried a number of workarounds but nothing helped. In particular I have subscribed to the SizeChanged event of the child window and set its sizes relative to the layout root's sizes. Here is the code of the SizeChanged event handler:

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

This code modifies the sizes of the child window, but it also updates the sizes of the overlay, so that it no longer covers the whole page, which is a very strange behavior.

Has anyone encountered this kind of problems? Please share any ideas.

Thanks in advance.

Narek Malkhasyan
  • 1,332
  • 1
  • 12
  • 22

1 Answers1

0

I had a similar problem. It occured because scale in a browser was higher than 100%.

Undo
  • 25,519
  • 37
  • 106
  • 129