Ticket Q278301
Visible to All Users

Dialog Window in xbap

created 14 years ago

Do you have any examples showing how you can create and show a custom dialog window in an xbap project using DXWindow?

Comments (3)
DevExpress Support Team 14 years ago

    Hi Guðjón,
    I am afraid it is impossible to use DXWindow in this situation, because the Window class descendants cannot be used in an XBAP application. It looks as if the only solution we can suggest is to create a necessary popup window yourself, using, for instance, the Popup control. Please check this article to learn more on this approach:
    Creating popup windows in XBAP applications
    Thanks,
    Vito

    GV GV
    Guðjón Vilhjálmsson 14 years ago

      Thank you for your reply.
      I think I found a way to show a dialog window in xbap using your controls…
      FloatingContainer container = FloatingContainerFactory.Create(FloatingMode.Window);
      FrameworkElement owner = CalcOwner();
      FloatingContainerParameters parameters = new FloatingContainerParameters();
      parameters.AllowSizing = false;
      parameters.CloseOnEscape = true;
      parameters.ShowModal = true;
      FloatingContainer.ShowDialog(new UserControl1(), owner, new Size(400, 400), parameters);
      Of course it is not a true dialog because it only lives inside the browser, but it behaves like one…
      Thank you for your help.

      DevExpress Support Team 14 years ago

        Hi Guðjón,
        Thank you for the response, and for providing the sample code.
        Indeed, it looks as if it is possible to emulate this functionality using the FloatingContainer. I apologize that I did not check this previously.
        Thank you for posting the solution you have found here. This code might be rather useful for other customers, looking for the same functionality.
        Thanks,
        Vito

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.