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

4008 : RuntimeError, Message: Layout cycle detected. Layout could not complete.

3 Answers 156 Views
Gauge
This is a migrated thread and some comments may be shown as answers.
Alexey Oyun
Top achievements
Rank 1
Alexey Oyun asked on 18 May 2010, 10:22 AM
When I try to add 3rd gauge control to the page I get this error:

4008 : RuntimeError, Message: Layout cycle detected. Layout could not complete.

And if I take away one of those three gauge controls page loads fine.

Here is markup, no code behind. I have used dll from RadControls_for_Silverlight_4_2010_1_0422_TRIAL_hotfix
Thanks.

<navigation:Page x:Class="TelerikChartNav.Views.Gauge"  
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"  
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
           mc:Ignorable="d" 
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" xmlns:tlrkGaugeControl="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Gauge" xmlns:tlrkGauge="clr-namespace:Telerik.Windows.Controls.Gauges;assembly=Telerik.Windows.Controls.Gauge" d:DesignWidth="640" d:DesignHeight="480" 
           Title="Gauge Page"
    <Grid x:Name="LayoutRoot"
        <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Visible" Canvas.Top="60" Canvas.Left="340"
            <StackPanel> 
 
                <tlrkGaugeControl:RadGauge x:Name="radGauge0" Width="200" Height="200"
                    <tlrkGauge:RadialGauge> 
                        <tlrkGauge:RadialScale  x:Name="radialScale0" Min="0"  Max="1000"
                            <tlrkGauge:IndicatorList> 
                                <tlrkGauge:Needle x:Name="needle01" Value="100" TooltipFormat="kjk {0} \n Volume" /> 
                                <tlrkGauge:Needle x:Name="needle02" Value="200" /> 
                            </tlrkGauge:IndicatorList> 
                        </tlrkGauge:RadialScale> 
                    </tlrkGauge:RadialGauge> 
                </tlrkGaugeControl:RadGauge> 
 
                <tlrkGaugeControl:RadGauge x:Name="radGauge1" Width="200" Height="200"
                    <tlrkGauge:RadialGauge> 
                        <tlrkGauge:RadialScale  x:Name="radialScale" Min="0"  Max="1000"
                            <tlrkGauge:IndicatorList> 
                                <tlrkGauge:Needle x:Name="needle1" Value="100" TooltipFormat="Tooltip {0}" /> 
                                <tlrkGauge:Needle x:Name="needle2" Value="200" /> 
                            </tlrkGauge:IndicatorList> 
                        </tlrkGauge:RadialScale> 
                    </tlrkGauge:RadialGauge> 
                </tlrkGaugeControl:RadGauge> 
                 
                <tlrkGaugeControl:RadGauge x:Name="radGauge2" Width="200" Height="200"
                    <tlrkGauge:LinearGauge> 
                        <tlrkGauge:LinearScale x:Name="linearScale1" Min="0" Max="1000"
                            <tlrkGauge:IndicatorList> 
                                <tlrkGauge:LinearBar x:Name="linearBar1" Value="500" /> 
                            </tlrkGauge:IndicatorList> 
                        </tlrkGauge:LinearScale> 
                        <tlrkGauge:LinearScale x:Name="linearScale2" Min="0" Max="1000"
                            <tlrkGauge:IndicatorList> 
                                <tlrkGauge:LinearBar x:Name="linearBar2" Value="1000" /> 
                            </tlrkGauge:IndicatorList> 
                        </tlrkGauge:LinearScale> 
                    </tlrkGauge:LinearGauge> 
                </tlrkGaugeControl:RadGauge> 
                 
            </StackPanel> 
        </ScrollViewer> 
    </Grid> 
</navigation:Page> 
 



3 Answers, 1 is accepted

Sort by
0
David Gunderson
Top achievements
Rank 1
answered on 18 May 2010, 02:48 PM
I also get this Error when I call out more than 3 usercontrols that contain Gauges
Mainpage.xaml
<UserControl  
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"   
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"   
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"   
    xmlns:my="clr-namespace:MetricsDashAuto.Web"   
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" 
    xmlns:local="clr-namespace:MetricsDashAuto" x:Class="MetricsDashAuto.MainPage"   
    mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480" HorizontalAlignment="Center" VerticalAlignment="Center">  
    <Grid x:Name="Layout_Root" Background="#FF373737">  
        <Grid.RowDefinitions> 
            <RowDefinition Height="33*" /> 
            <RowDefinition Height="33*" /> 
            <RowDefinition Height="33*" /> 
        </Grid.RowDefinitions> 
        <Grid.ColumnDefinitions> 
            <ColumnDefinition Width="25*"/>  
            <ColumnDefinition Width="25*"/>  
            <ColumnDefinition Width="25*"/>  
            <ColumnDefinition Width="25*"/>  
        </Grid.ColumnDefinitions> 
        <local:SLUC15337 Grid.Row="0" Grid.Column="0" /> 
        <local:SLUC10089 Grid.Row="0" Grid.Column="1"/>  
        <local:SLUC10517 Grid.Row="0" Grid.Column="2" /> 
        <local:SLUC10677 Grid.Row="0" Grid.Column="3"/>  
        <local:SLUC11330 Grid.Row="1" Grid.Column="0" /> 
        <local:SLUC12345 Grid.Row="1" Grid.Column="1" /> 
        <local:SLUC14708 Grid.Row="1" Grid.Column="2" /> 
        <local:SLUC14725 Grid.Row="1" Grid.Column="3" /> 
        <local:SLUC11904 Grid.Row="2" Grid.Column="0" /> 
        <local:SLUC9652 Grid.Row="2" Grid.Column="1" />    
    </Grid> 
 
</UserControl> 
one of the usercontrols (they are all the same content different names for x:Names 
<UserControl  
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:Telerik_Windows_Controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Gauge"   
    xmlns:Telerik_Windows_Controls_Gauges="clr-namespace:Telerik.Windows.Controls.Gauges;assembly=Telerik.Windows.Controls.Gauge" 
    xmlns:Telerik_Windows_Controls_Map="clr-namespace:Telerik.Windows.Controls.Map;assembly=Telerik.Windows.Controls.DataVisualization"   
    xmlns:riaControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.DomainServices"   
    xmlns:MetricsDashAuto_Web="clr-namespace:MetricsDashAuto.Web" 
    mc:Ignorable="d" 
    x:Class="MetricsDashAuto.SLUC14725" 
    d:DesignWidth="640" d:DesignHeight="480">  
 
    <Grid x:Name="LayoutRoot_14725" DataContext="{Binding Data, ElementName=CognosMetricDomainDataSource14725}" Background="#FF373737"   
          HorizontalAlignment="Center" Width="640">  
        <Grid.RowDefinitions> 
            <RowDefinition Height="80*"/>  
            <RowDefinition Height="10*"/>  
            <RowDefinition Height="10*"/>  
        </Grid.RowDefinitions> 
        <Telerik_Windows_Controls:RadGauge HorizontalAlignment="Center" x:Name="CognosMetricRadGauge14725" VerticalAlignment="Center">  
 
            <Telerik_Windows_Controls_Gauges:RadialGauge x:Name="Gauge14725">  
                <Telerik_Windows_Controls_Gauges:RadialScale Min="0.80964" Max="1.09956" Radius="0.75">  
                    <Telerik_Windows_Controls_Gauges:RangeList> 
                        <Telerik_Windows_Controls_Gauges:RadialRange Background="#AB34E800" 
                            StartWidth="0.12" 
                            EndWidth="0.12" 
                            Max="{Binding GMax}" 
                            Min="{Binding GMin}" 
                            ToolTipService.ToolTip="Yellow"/>  
                        <Telerik_Windows_Controls_Gauges:RadialRange Background="Yellow" 
                            StartWidth="0.12" 
                            EndWidth="0.12" 
                            Max="{Binding GMin}" 
                            Min="{Binding RMax}"/>  
                        <Telerik_Windows_Controls_Gauges:RadialRange Background="Red" 
                            StartWidth="0.12" 
                            EndWidth="0.12" 
                            Max="{Binding RMax}" 
                            Min="{Binding RMin}" 
                            ToolTipService.ToolTip="{Binding RMax}"/>  
                    </Telerik_Windows_Controls_Gauges:RangeList> 
                    <Telerik_Windows_Controls_Gauges:IndicatorList> 
                        <Telerik_Windows_Controls_Gauges:Needle Value="{Binding ActualVal}"/>  
                    </Telerik_Windows_Controls_Gauges:IndicatorList> 
                </Telerik_Windows_Controls_Gauges:RadialScale> 
            </Telerik_Windows_Controls_Gauges:RadialGauge> 
        </Telerik_Windows_Controls:RadGauge> 
        <Ellipse   
            x:Name="Ellipse14725" ToolTipService.ToolTip="{Binding Description}" 
            Fill="#00EFA400"   
            Width="{Binding Width, ElementName=Gauge}" 
            Height="{Binding Height, ElementName=Gauge}"   
            VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Cursor="Hand" 
            Stroke="#00000000" MouseLeftButtonUp="Ellipse14725_MouseLeftButtonUp" 
            /> 
        <Grid> 
            <Grid.RowDefinitions> 
                <RowDefinition Height="96*" /> 
                <RowDefinition Height="96*" /> 
                <RowDefinition Height="53*" /> 
                <RowDefinition Height="43*" /> 
                <RowDefinition Height="96*" /> 
            </Grid.RowDefinitions> 
              
            <TextBlock Grid.Row="4" Foreground="GhostWhite" Text="{Binding ActualVal}" FontSize="14" VerticalAlignment="Center" Margin="1,0,0,0" TextAlignment="Center" HorizontalAlignment="Center" /> 
            <Telerik_Windows_Controls_Map:Arrow Grid.Row="3" HorizontalAlignment="Center" x:Name="Arrow14725" VerticalAlignment="Bottom" Direction="Down" Margin="316,0" /> 
            <TextBox Text="{Binding Trend}" x:Name="TxtblkTrend14725" Visibility="Visible" HorizontalAlignment="Left" VerticalAlignment="Top"/>  
        </Grid> 
        <TextBlock Foreground="GhostWhite" HorizontalAlignment="Center" Text="{Binding MName}" Grid.Row="1" FontSize="14" FontStretch="Condensed" /> 
        <Grid Grid.Row="2">  
            <Grid.ColumnDefinitions> 
                <ColumnDefinition /> 
                <ColumnDefinition /> 
            </Grid.ColumnDefinitions> 
            <TextBlock Foreground="GhostWhite" HorizontalAlignment="Right" Text="Goal: " Grid.Row="2" Grid.Column="0" FontSize="14" FontStretch="Condensed" /> 
            <TextBlock Foreground="GhostWhite" HorizontalAlignment="Left" Text="{Binding GMin}" Grid.Row="2" Grid.Column="1" FontStretch="Condensed" FontSize="14" /> 
 
        </Grid> 
        <riaControls:DomainDataSource AutoLoad="True" Height="0" x:Name="CognosMetricDomainDataSource14725" QueryName="GetCognosMetricsByKPIIDQuery" Width="0">  
            <riaControls:DomainDataSource.DomainContext> 
                <MetricsDashAuto_Web:CognosMetricsDS /> 
            </riaControls:DomainDataSource.DomainContext> 
            <riaControls:DomainDataSource.QueryParameters> 
                <riaControls:Parameter x:Name="Parameter14725" ParameterName="KPInum" Value="14725" /> 
            </riaControls:DomainDataSource.QueryParameters> 
        </riaControls:DomainDataSource> 
    </Grid> 
</UserControl> 

in my case all the gauges load but i still get the error.
0
Accepted
Velin
Telerik team
answered on 20 May 2010, 03:42 PM
Hi Guys,

This issue was fixed after the Q1.SP1 version of the control. To get things working, please, upgrade to the latest internal build available in your customer accounts.

We are sorry for this inconvenience.

Best wishes,
Velin
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.
0
Alexey Oyun
Top achievements
Rank 1
answered on 20 May 2010, 04:16 PM
Checked on 00583RadControls_for_Silverlight_4_2010_1_0515_Trial problem fixed.
Tags
Gauge
Asked by
Alexey Oyun
Top achievements
Rank 1
Answers by
David Gunderson
Top achievements
Rank 1
Velin
Telerik team
Alexey Oyun
Top achievements
Rank 1
Share this question
or