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
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
I know this solution. but if i set w.StartupPosition = StartupPosition.Center; I cannot change the top and left of XamDialogWindow anymore. My purpose is open XamDialogWindow in the center but if open second, we hope there is a margin between these 2 windows, so i need to change the top and left to achieve this.