Layout Cycle Detected

5 posts, 0 answers
  1. digitall
    digitall avatar
    169 posts
    Member since:
    Jun 2006

    Posted 25 Nov 2011 Link to this post

    I just upgraded to the latest Q3 2011 bits and in trying to utilize a RadWindow I get the following error:

    {System.Windows.LayoutCycleException: Layout cycle detected.  Layout could not complete.
       at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
       at MS.Internal.XcpImports.MethodEx(DependencyObject obj, String name)
       at System.Windows.UIElement.UpdateLayout()
       at Telerik.Windows.Controls.RadComboBox.NavigateToItem(Object item)
       at Telerik.Windows.Controls.RadComboBox.OnSelectionChanged(SelectionChangedEventArgs e)
       at Telerik.Windows.Controls.RadComboBox.SelectItemDelayedSelectionChanged(Object item)
       at Telerik.Windows.Controls.RadComboBox.NotifyComboBoxItemMouseUp(RadComboBoxItem comboBoxItem)
       at Telerik.Windows.Controls.RadComboBoxItem.OnMouseLeftButtonUp(MouseButtonEventArgs e)
       at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
       at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)}

    The code to reproduce this error was taken directly from the demo site since my original version was getting the error. It is:
    string alertText = "The employee photo has been uploaded.";
    RadWindow.Alert(alertText, new EventHandler<WindowClosedEventArgs>(OnClosed));
     
     
    private void OnClosed(object sender, WindowClosedEventArgs e)
    {
         RadWindow.Alert(String.Format("DialogResult: {0}, PromptResult: {1}", e.DialogResult, e.PromptResult));
    }

    I upgraded to the Q3 bits because I was getting this error (same code) with Q2 as well.

    Any ideas?
  2. digitall
    digitall avatar
    169 posts
    Member since:
    Jun 2006

    Posted 29 Nov 2011 Link to this post

    Anyone?
  3. DevCraft banner
  4. George
    Admin
    George avatar
    1332 posts

    Posted 30 Nov 2011 Link to this post

    Hi Digitall,

    I tried to reproduce the problem, but to no avail. Could you please try out the attached project and let me know if I missed something? I am glad to assist you further.

    Regards,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  5. jason
    jason avatar
    28 posts
    Member since:
    Oct 2010

    Posted 19 Jun 2012 Link to this post

    Any update on this?  I get this error if I follow these steps:

    1.  window.Show()
    2. Maximize window
    3. Cick the button to return window to normal

    when the window opens if I move it slightly then this error is not reproducible.  I tried setting a min width and height like suggested above but did not work.

    Also wanted to mention something about my content.  The content starts as this:

     
    
    <toolkit:BusyIndicator x:Name="BusyIndicator" >
       <Grid x:Name="GridLayout" >
           <ItemsControl Grid.Row="0" x:Name="GridItems" >
               <ItemsControl.ItemsPanel>
                   <ItemsPanelTemplate>
                       <Grid />
                   </ItemsPanelTemplate>
               </ItemsControl.ItemsPanel>
           </ItemsControl>
       </Grid>
       </toolkit:BusyIndicator>

    I generate some xaml on the server and then add it to the ItemsControl.  The xaml that gets generated is a datagrid and if I leave out this content then I also don't get the error.
  6. George
    Admin
    George avatar
    1332 posts

    Posted 25 Jun 2012 Link to this post

    Hello,

    Could you please give us some more information about this scenario so we can test it on our side? Is the xaml loaded before or after the window is opened? Moreover, if you can send us a running sample that reproduces the issue it will be of great help.

    Regards,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
DevCraft banner