I'm using 12.1. XamDialogWindow being set to IsModal=True is not working like a WinForm dialog window.
Quoting the online help: "Modal dialog – This dialog window always maintains the active window status until it is closed. When a modal dialog window is opened, your end user cannot interact with any other part of the application until the dialog window is closed"
Look at the sample provided with the product. Click "Open Modal Window". Dialog windows are supposed to keep focus and block access to the rest of the app until it's closed. This is not the behavior. You can click on the other tabs (xaml, snippet, etc), the toolbar type buttons on the top are accessible and the app options on the left are also accessible. Click the XAML tab, then back to the Sample tab (which should not be allowed) and the Dialog Window is closed.
Does XamDialogWindow work as a modal window?
Hello James,
In the samples browser the XamDialogWindow is within a TabControl container, this would be the case for the tabs to be active.
When setting the XamDialogWindow outside of the TabControl will set those controls to be in-active.
I have attached a sample.
Thank you. I've looked at your sample and it's the same behavior as what I can reproduce which is not what the help defines IsModal as. The behavior is wrong. A dialog window (IsModal=True) is supposed to lock the app until the dialog window is closed and that's what the help file says too. I quoted it in my initial post.
I am going to keep working to see if I can force it to behave like a dialog window. This is my issue with the behavior: I can make it lock its container... which of itself is incorrect for a Windows modal window.
This particular app has a XamRibbonWindow container, and then a RibbonWindowContentHost for the Office title bar look & feel. The 2nd container is a XamDockManager that filles the rest of the window with a few panels that are irrelevant. In order for your proposed solution to work, I'd need to insert the XamDialogWindow at the top of the container. Doing so generates design time XAML errors. The IG objects are defining what I need as a true Modal window. If I insert the XamDialogWindow in the dock mgr, the ribbon bar would remain active which is not acceptable for a modal window.
With the 3 objects mentioned above, how can I make a XamDialogWindow lock the app and not lose the Office look & feel of the title bar? If I can make that work, it's a "meh" solution at best, but I can deal with it at least because the window with the focus will be locked until the quasi-modal window is closed.
<igRibbon:XamRibbonWindow >
<igRibbon:RibbonWindowContentHost >
<igRibbon:RibbonWindowContentHost.Ribbon>
</igRibbon:XamRibbon>
</igRibbon:RibbonWindowContentHost.Ribbon>
<igDock:XamDockManager >
</igDock:XamDockManager>
</igRibbon:RibbonWindowContentHost>
</igRibbon:XamRibbonWindow>
For kicks I even Googled "modal window definition"- and there is only 1: The modal window has to be dealt with before returning to the application. Your implementation of a modal window is incorrect because the app is still widely accessible with the modal dialog window open. That's a huge functionality issue!