Bug Report T307320
Visible to All Users

Empty LayoutGroup doesn't appear in the layout after deserialization even after a panel is added into it

created 9 years ago

Hello,

I'm facing strange behavior after restoring layout by calling DockLayoutManager.RestoreLayout from xml. Please open attached sample app.

  1. Run the application and close it by clicking on [X] button so that "layout.xml" file is created in bin folder

  2. Uncomment "#region STEP 2" part in MainWindow.xaml and run the application (it is important that application loads layout of state from #1)
    2.1. Click once on "Attach panel" --> despite the fact code has docked the panel, it is not present in LayoutTree, see Output window
    2.2. Click again on "Attach panel" --> now panel is added to layout correctly, WHY NOW? but IS NOT VISIBLE, see Output Window
    2.3. Toggle "IsClosedInViewModel" --> it has no effect, despite the fact binding is established correctly and is present on Closed property --> Panel is never visible
    2.4. Stop the application by killing it from VS, so that layout is now not saved

  3. Uncomment "#region STEP 3" part in MainWindow.xaml and run the application (it is important that app loads layout of state from #1)
    3.1. Click on "Attach panel" button --> again Panel is not added, see Output
    3.2. Click on "Attach panel" button --> Panel is now added to layout (see output) and IS VISIBLE
    3.3. Toggle "IsClosedInViewModel" --> Panel now shows and hides as expected

2.5. Delete "layout.xml" file and comment back "#region STEP 3" so that you get MainWindow.xaml back to state #2 and run the application
2.6. Click twice on "Attach panel" --> Panel is attached
2.7. Toggle "IsClosedInViewModel" --> now it works as expected

Thus from my observations, I assume that if LayoutGroup is empty at the moment when docking to layout, it somehow switches to invisible mode and stays invisible even after adding some content later. Am I right? If so, how can I avoid it?

As you can see from 2.7. if there is no layout restored, then everything works ok, that's why I suspects it has something to do with restoration.

Thanks
Kind regards
Filip<

Comments (1)
Alexander Russkov (DevExpress) 9 years ago

    Hi Filip,
    Thank you for your sample project and detailed description. I have reproduced this issue and passed this ticket to our developers for further research. We will update this thread as soon as we make any progress.

    Thanks,
    Alexander

    Answers approved by DevExpress Support

    created 9 years ago (modified 9 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.

      Show previous comments (1)
      Andrey K (DevExpress Support) 9 years ago

        Hi,

        The problem was not fixed completely. I have returned the thread to our developers. Please accept our apologies for the inconvenience.

        Thanks,
        Andrey

        FM FM
        Filip Martinko 1 9 years ago

          No problem, looking forward to another fix :)
          Thanks,
          Filip.

          Andrey K (DevExpress Support) 9 years ago

            Thank you for your patience. Our developers have fixed both issues. I have requested a hotfix for you. Please try it once it is available and let me know whether the problem is gone.

            Thanks,
            Andrey

            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.