Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
380
Maximize the XamDialogWindow issue
posted

If I add a XamDialogWindow to it by follwing code and then click Maximize  button.

the XamDialogWindow's position is incorrect.

see attached project for the details

SilverlightApplication3.zip
  • 6912
    Suggested Answer
    posted

    Hi,

    That's because of the Horizontal and VerticalAlignment you set on the window. If you change the code to:

    XamDialogWindow w = new XamDialogWindow();
    w.StartupPosition = StartupPosition.Center;
    w.RestrictInContainer = true;
    //w.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
    //w.VerticalAlignment = System.Windows.VerticalAlignment.Center;
    w.Height = 500;
    w.Width = 500;
    

    The window will be positioned properly when maximized.

    HTH