hello everybodyMy application has a main window, with one menu/toolbar and the main content area, which uses a XamDockManager.
What I am trying to achieve is:I need a MODAL window to be shown to the user, which needs to be on top of the docking panels.
I tried to use a XamDialogWindow control, but all I got is to see the menu/toolbar grayed out, and no dialog visible.I also checked this post, which is however quite old and states it is not possiblehttps://ko.infragistics.com/community/forums/t/55594.aspx
Since the post is old, was some progress done on this?I need the window not to be forced inside the container (as dialog windows does, as far as I understood), and I also need the dialog to be modalThanks in advance for your help
Hello Valentina,
I am unsure of why you would not be seeing your XamDialogWindow in this case. Perhaps it does not have a height or width? It is also possible that perhaps you have added it behind the XamDockManager?
Regarding the old forum post, there have not been any developments on this behavior, as the behavior described in that forum thread is the expected behavior of the XamDialogWindow control. To restate that behavior, a modal XamDialogWindow is only modal to the window or element that owns it - it is not modal to the entirety of the WPF application. I have attached a sample project to demonstrate the above mentioned behavior.
In the sample, if you click the button while the pane is still docked, you will notice that you will lose the ability to work with that pane, as the dialog will be modal to that window, and can be the only thing that can be interacted with in that window. If, however, you float that pane and then click the button, you will see the behavior as mentioned above. The XamDialogWindow will be modal to the main window that contains the XamDockManager, but the floating pane will still be able to be interacted with, as it does not care about the modality of the XamDialogWindow in the window containing the XamDockManager because it is no longer in it.
In order to workaround this, I would recommend that perhaps you hide any panes that are floating when opening your window, and then reshow them when that window closes. This will ensure that your XamDialogWindow should be the only thing your users can interact with.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate Developer
Hello Andrew,
I am sorry for the very late reply.
First, thanks for your feedback
I understand your suggestion, but I kindly ask you yo help me with my case that is slightly different: I have a menu and a docking area.
I would like to click on a menu button and have a dialog window on top of any other control (e.g. center screen), not stuck inside a panel/container. Please take a look at my example: I cannot see the dialog.
I apologize for the delay in my response on this matter.
I have taken a look at the sample project that you have provided, and I am able to see the XamDialogWindow, although it appears that it is bounded by a Grid.RowDefinition that only has a Height of 50. Being that you have the Horizontal and Vertical Alignment properties both set to "Center," it appears you are looking to have this XamDialogWindow show in the center of your page. Being that you have multiple Grid.RowDefinitions, I would recommend setting the Grid.RowSpan property to the number of Grid.RowDefinitions that you have.
Also, I would recommend utilizing the StartupPosition property of the XamDialogWindow set to "Center," rather than the Horizontal and Vertical Alignment properties to show it in the center of your screen. In the case of your sample project, the full XamDialogWindow with these settings would look like the following:
<interactions:XamDialogWindow x:Name="dialog" Height="200" Width="300" StartupPosition="Center" Header="Modal Dialog" IsModal="True" Visibility="Collapsed" Grid.RowSpan="2"/>