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
430
Popup does not appear in center
posted

I have a XamDialogWindow inside of an ItemsControl inside of the primary Grid of a RibbonWindowContentHost that is proving to be troublesome. The ItemsControl is using a Grid as its panel template (PRISM/MEF design decision using Regions). I am using a button on the XamRibbon of the RibbonWindowContentHost to show the dialog using the Show() function and the dialog will not appear centered in the window.  I have tried StartupPosition="Center" and tried using the CenterDialogWindow() function. It is far enough to the top and left that I cannot grab the top bar and reposition the popup. If I maximize the application, then I am able to get a handle on the popup, however, it cannot be moved in the entire area where the parent Grid is located. It's as if the popup is working with incorrect dimensions of the parent and thinks its in the center when the center put its in the extreme top left of the application. Resizing and moving the application does not help the bounding box problem.

Before I go through the work of trying to recreate the problem in a sample application, does anyone have any clue as to why this is happening? If I turn on IsModal, the modal overlay is over the correct area.