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!
After some research, restricting outside the container has been determined to be a new feature request. I have sent your feature request directly to our product management team. Our product team chooses new feature requests for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested features, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your feature is chosen for development, you will be notified at that time. Your reference number for this feature request is PI12100073.
If you would like to follow up on your feature request at a later point, you may contact Developer Support management via email. Please include the reference number of your feature request in the subject and body of your email message. You can reach Developer Support management through the following email address: dsmanager@infragistics.com
Thank you for your request.
Thank you for pointing out the discrepency between the literal definition of a modal dialog window and our controls intended use. I will make sure the documentation is updated to reflect its intended use. The term "Modal" in general is a blocking of interaction, which in the case of the XamDialogWindow, blocks interaction with the parent container.
Despite the literal definition of a modal dialog window, the XamDialogWindow is not technically a window. You probably noticed this when you declared it inside the visual tree within your XAML markup. It is technically a ContentControl which gives you the flexibility to provide a modal/non-modal dialog experience over a particular portion of your applications interface. This is something that is impossible with a "normal" modal/non-modal window.
Something to keep in mind is that this control came from the world of Silverlight, which has no concept of a Window. So the design of this control was actually extremely thought out, and provids functionality and features not provided to you by Microsoft in the Silverlight platform. It is quite possible that the "Window" in the control name was not the best choice as to not create such an expectation. Since Silverlight doesn't have a Window, the name was chosen based on the simulations of a window. Later, it was ported over to WPF to provide the same felxibility in dialog creation and behavior for WPF applications, which you still cannot do with any control provided to you by Microsoft. Even though it was ported to WPF, its intended funcitonality did not change. It remains "Modal" to its parent container.
I will add a backlog item to add this feature request to extend the modal functionality for WPF and meet the criteria for the literal definition of a "modal dialog window". Features are chosen for implementation based on a number of factors in which populatrity is one of them. Unfortunately, you are the only one that has requested this feature that I know of.
Until then, there a two ways that I can think of to achieve your expected results. One is to just use a normal WPF Window and show it as a dialog. You can take the style of the XamDialogWindow chrome and style your Window control to match. Or you can simply host a XamDialogWindow control inside a WPF Window. Be sure to hide the WPF Windows chrome and add the functionlaity of closing the Window on the XamDialogWindow closing event.
Just for future reference, I hope you do not adhere so literally to all definitions you run into. As with most definitions, there are always alternatives to them. Much like the design patterns you use to build your apps (MVP, MVC, MVVM), although they have a literal deifnition, their implementnations can vary drastically depending on who is using them.
Thanks for the feedback. I have address this to the documentation team.
Let me know if I can provide any further assistance.
OK, This is going to sound rude...and I don't really care: This is not a "feature request"...Call it a bug or a lousy design if you want, because a modal window is exatly what it says it is: a MODAL window-- Lock the app until the window is dealt with by the user! GEEZ.... It is NOT NOT NOT a feature request. Tell your engineers to Google the definition of "modal dialog window"-- there is 1 and only 1 definition.
Come on Infragistics! OWN UP- you have a lousy design and are trying to hide behind what your Help file even defines a modal window as. The quote is in my original post!
Customers, and I am sure I am not the only 1, can't stand vendors that won't own up to their own bad designs!
Again, quoting Infragistics Help File: "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"
Locking the container is NOT proper functionality- own up & fix it. Do you have any idea how many hours were burned trying to make it work, when it flat out will not work as a modal window?????? YEAH--- it's damn annoying!!