System.Windows.LayoutCycleException: Layout cycle detected. Layout could not complete.

1 posts, 0 answers
  1. Liordino
    Liordino avatar
    9 posts
    Member since:
    Aug 2012

    Posted 22 Feb 2013 Link to this post


    I'm developing a Silverlight application in wich one of its pages is the one with a screenshot attached.
    The item on the left is a RadListBox, wich is filled by data from a webservice.

    The problem that I'm facing is that once the RadListBox is filled with N records from the webservice, choosing a particular record (the one with the black circle on it) of it causes the application to show a blank screen, which later I saw that is caused by a Exception being caught on App.xaml.cs, on the Application_UnhandledException method, and is a System.Windows.LayoutCycleException without any stacktrace and with the message "Layout cycle detected.  Layout could not complete.". Researching I found out that this occurs when layout is changed or when there's a infinite loop somewhere, but couldn't find out how to solve it.

    The page works like this: the controls at the top are filters, and clicking in the "Pesquisar" button causes the page to call the webservice asking for data with these filters on and filling the RadListBox bellow the "Vendas" label. The grid and all the textboxes bellow the "Detalhes" label are filled to. I tried to comment the code in wich they are filled, wich fixed the error, but unfortunately they need to be filled.

    Any ideas?

    Thanks in advance!
Back to Top