This is a migrated thread and some comments may be shown as answers.

Layout Cycle Detected

4 Answers 148 Views
Window
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
digitall
Top achievements
Rank 1
digitall asked on 25 Nov 2011, 08:35 PM
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?

4 Answers, 1 is accepted

Sort by
0
digitall
Top achievements
Rank 1
answered on 29 Nov 2011, 06:53 PM
Anyone?
0
George
Telerik team
answered on 30 Nov 2011, 05:02 PM
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 >>

0
jason
Top achievements
Rank 1
answered on 20 Jun 2012, 01:24 AM
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.
0
George
Telerik team
answered on 25 Jun 2012, 07:33 AM
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 >>

Tags
Window
Asked by
digitall
Top achievements
Rank 1
Answers by
digitall
Top achievements
Rank 1
George
Telerik team
jason
Top achievements
Rank 1
Share this question
or