Bug Report T666546
Visible to All Users

WindowedDocumentUIService defined in a layout panel uses a window where DockLayoutManager is placed as owner

created 7 years ago

[DevExpress Support Team: CLONED FROM T666010: I have a question about the WindowedDocumentUIService]
I have additional questions.
Most pop-ups work exactly the way you tell them.
However, some pop-ups bound to ItemSource in some DockLayoutManager still appear in the center of the main window.
Are windows that are dependent on the DockLayoutManager unable to do what I want?

Show previous comments (3)
Kirill (DevExpress Support) 7 years ago

    Hello,
    Our developers are working on this issue. Currently, we cannot provide you with any time estimates as to when it will be fixed. At the same time, a fix for this issue may change the default inner DockLayoutManager behavior and bring Breaking Changes. As the fix may affect our customer's existing projects, we cannot introduce it in minor versions and will introduce it in the next major version 18.2. So, if the issue is urgent for you or you won't be able to upgrade to this version, I suggest that you use the workaround we previously provided. I've found that it's possible to simplify it in the following manner:

    C#
    public class WindowedDocumentUIServiceEx : WindowedDocumentUIService { protected override IWindowSurrogate CreateWindow(object view) { var window = base.CreateWindow(view); if (SetWindowOwner) { var owner = LayoutTreeHelper.GetVisualParents(AssociatedObject).OfType<FloatingPaneWindow>().FirstOrDefault(); window.RealWindow.Owner = owner ?? Window.GetWindow(AssociatedObject); } return window; } }

    I've modified the sample project to demonstrate the main idea of this approach.

    Thanks,
    Kirill

    Kirill (DevExpress Support) 7 years ago

      Just to follow up and clarify the issue you faced. Our WindowedDocumentUIService searches for the owner window when creating its own window. The issue occurs because when you make your nested View with WindowedDocumentUIService floating, this service identifies the root MainWindow it as the owner window instead of searching for the parent floating container. The workaround we posted changes this behavior and returns the parent floating container instead.

      Thanks,
      Kirill

        Thank you for your kind reply.

        Answers approved by DevExpress Support

        created 7 years ago

        We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

        Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

          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.