RadWindow crash if not resized first

2 posts, 0 answers
  1. Michel Hardy
    Michel Hardy avatar
    9 posts
    Member since:
    Jun 2010

    Posted 25 Aug 2010 Link to this post


    I have a user control:

    <Grid x:Name="LayoutRoot" Background="White">
        <telerik:RadDockPanel LastChildFill="True" Background="White">
            <telerikNavigation:RadToolBar telerik:RadDockPanel.Dock="Top" telerik:DockingPanel.Dock="Top">
                    <Button Name="btnPrint" Content="Print" />
                    <Button Name="btnPrevious" Content="Previous" />
                    <Button Name="btnNext" Content="Next" />
                    <Slider Name="uiZoomSlider" Width="100" Minimum="0.2" Maximum="10" ValueChanged="uiZoomSlider_ValueChanged"
            <ScrollViewer Name="scvDocument" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                <telerik:LayoutTransformControl x:Name="ltDocument">
                        <ScaleTransform x:Name="Scale"/>
                    <Viewbox Name="vbDocument">
                        <Border Name="DocumentContainer" BorderBrush="Gray" BorderThickness="1" />

    Code behind of the user control:

    private void uiZoomSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
        if (ltDocument != null)
            ((ScaleTransform)ltDocument.LayoutTransform).ScaleX = e.NewValue;
            ((ScaleTransform)ltDocument.LayoutTransform).ScaleY = e.NewValue;

    I create a RadWindow and set its content with a new instance of my user control:

    Telerik.Windows.Controls.RadWindow rw = new Telerik.Windows.Controls.RadWindow();
    ucPrintPreview pp = new ucPrintPreview();
    rw.Content = pp;
    rw.CanClose = true;
    rw.CanMove = true;
    rw.IsRestricted = true;
    rw.Header = "Print Preview";
    rw.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterOwner;
    CoaPrintDocument cpd = new CoaPrintDocument();
    cpd.Height = 1024;
    cpd.Width = 748;
    pp.DocumentContainer.Child = (UIElement)cpd;

    When I show the RadWindow, if I move the slider control to zoom the viewbox. I get the following error (See error.jpg):
    Line: 56
    Error: Unhandled Error in Silverlight Application
    Code: 4008   
    Category: RuntimeError      
    Message: Layout cycle detected.  Layout could not complete.    

    But if I resize the RadWindow first and then move the slider control, it works without any error.

    Anything to work around this problem?

    Thank you,
  2. Miroslav
    Miroslav avatar
    922 posts

    Posted 31 Aug 2010 Link to this post

    Hi Michel Hardy,

    Thank you for reporting this, your Telerik Points have been updated for your feedback.

    The issue has been logged here:


    Is it possible for you to set a MinHeight to the RadWindow? Then the layout cycle will not be there.

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top