ManagedRuntimeError error #4004 in control 'Xaml1 in RadDocking

2 posts, 0 answers
  1. Hector
    Hector avatar
    92 posts
    Member since:
    May 2009

    Posted 18 Jun 2009 Link to this post

    I'm gettinig this annoying error when I put my page congtents inside of a RadDocking control.  sometimes I get a Javascript error other times I get a runtime error.  The javascript error is: ManagedRuntimeError error #4004 in control 'Xaml1' and the runtime error is:

    System.OutOfMemoryException was unhandled
    If I take the RadDocking out, it works fine.
    Message: An unhandled exception of type 'System.OutOfMemoryException' occurred in Unknown Module.

     
    Here is my Page.xaml code:

    <UserControl xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"    
                 xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"    
                 xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"    
                 xmlns:telerikGridView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"    
                 xmlns:telerikGV="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView" 
                 xmlns:telerikDocking="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking" 
     
     
        x:Class="sl_swr.Page" 
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"   
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"   
     
                 Width="800" Height="Auto" > 
        <ScrollViewer VerticalScrollBarVisibility="Auto">  
     
              
        <Grid x:Name="LayoutRoot" Background="White" ShowGridLines="False" > 
            <Grid.Resources> 
                <DataTemplate x:Key="ComboBoxSelectReport">  
                    <Grid Margin="5,5,5,5" Width="350">  
                        <Grid.ColumnDefinitions> 
                            <ColumnDefinition Width="65 " /> 
                            <ColumnDefinition Width="auto"/>  
                        </Grid.ColumnDefinitions> 
                        <Grid.RowDefinitions> 
                            <RowDefinition /> 
                            <RowDefinition /> 
                        </Grid.RowDefinitions> 
                        <TextBlock Grid.Row="0" Grid.Column="0" FontWeight="Bold" Grid.ColumnSpan="2" Text="{Binding ReportName}" HorizontalAlignment="Left"/>  
                        <TextBlock Grid.Row="1" Grid.Column="0" Text="Description:" HorizontalAlignment="Left"/>  
                        <TextBlock Grid.Row="1" Grid.Column="1" Foreground="Blue" Margin="5,0,0,0" HorizontalAlignment="Left" 
                            Text="{Binding Description}" /> 
     
                    </Grid> 
                </DataTemplate> 
                <LinearGradientBrush x:Key="Office_BlackPictureFrame" EndPoint="0.491356224416577,0.974451988955925" StartPoint="0.777113682471078,-0.027352265088688">  
                    <GradientStop Color="#FF7D7D7D" Offset="0.032501"/>  
                    <GradientStop Color="#FF4D4D4D" Offset="0.036112000000000033"/>  
                    <GradientStop Color="#FF656565" Offset="0.065002"/>  
                    <GradientStop Color="#FF454545" Offset="0.068613000000000035"/>  
                    <GradientStop Color="#FF353535" Offset="0.72841"/>  
                    <GradientStop Color="#FF050505" Offset="0.987361"/>  
                    <GradientStop Color="#FF9F9F9F" Offset="0.54500001668930054"/>  
                    <GradientStop Color="#FF454545" Offset="0.381"/>  
                    <GradientStop Color="#FF1C1C1C" Offset="0.66"/>  
                </LinearGradientBrush> 
     
                <LinearGradientBrush x:Key="Office_BlackRowBackground" EndPoint="0.5,1" StartPoint="0.5,0">  
                    <GradientStop Color="#FF343639" Offset="1"/>  
                    <GradientStop Color="#FF373737" Offset="0"/>  
                    <GradientStop Color="#FF3A3B3D" Offset="0.15"/>  
                    <GradientStop Color="#FF121212" Offset="0.15"/>  
                </LinearGradientBrush> 
     
                <ControlTemplate x:Key="AccountTypesTemplate" TargetType="telerikGV:GridViewRow" > 
                    <Border x:Name="rowsContainer" Background="#FF525252" Padding="8,8,8,0" > 
                        <Border Background="{StaticResource Office_BlackRowBackground}" x:Name="selectedRow" 
                            BorderThickness="1" BorderBrush="#FF000000" > 
                            <Grid Width="400">  
                                <Grid.RowDefinitions> 
                                    <RowDefinition Height="30" /> 
                                    <RowDefinition Height="30" /> 
                                </Grid.RowDefinitions> 
                                <Grid.ColumnDefinitions> 
                                    <ColumnDefinition Width="30" /> 
                                    <ColumnDefinition Width="55" /> 
                                    <ColumnDefinition Width="*" /> 
                                    <ColumnDefinition Width="60" /> 
                                    <ColumnDefinition Width="*" /> 
                                </Grid.ColumnDefinitions> 
     
                                <CheckBox Grid.Column="0" Grid.Row="0"   Grid.RowSpan="2" HorizontalAlignment="Center" VerticalAlignment="Center" 
                                    Margin="5,5,5,5" Loaded="CheckBox_Loaded" > 
     
                                </CheckBox> 
     
                                <TextBlock Grid.Column="1" Grid.Row="1" Foreground="White" FontWeight="Bold" Margin="0,15,15,0"   
                                    VerticalAlignment="Top" HorizontalAlignment="Left" Text="Phone:" /> 
                                <TextBlock Grid.Column="3" Grid.Row="1" Foreground="White" FontWeight="Bold" Margin="0,15,15,0"   
                                    VerticalAlignment="Top" HorizontalAlignment="Left" Text="Group:" /> 
                                <!--Cells--> 
                                <telerikGV:GridViewCell Grid.Column="1" Grid.Row="0" Foreground="White" FontWeight="Bold" Margin="0,15,15,0"   
                                    VerticalAlignment="Top" HorizontalAlignment="Left" Value="{Binding Description}" Grid.ColumnSpan="4" /> 
                                <telerikGV:GridViewCell Grid.Column="2" Grid.Row="1" Foreground="White" FontWeight="Bold" Margin="0,15,15,0"   
                                    VerticalAlignment="Top" HorizontalAlignment="Left" Value="{Binding Value}" /> 
                                <telerikGV:GridViewCell Grid.Column="4" Grid.Row="1" Foreground="White" FontWeight="Bold" Margin="0,15,15,0"   
                                    VerticalAlignment="Top" HorizontalAlignment="Left" Value="{Binding GroupName}" /> 
                            </Grid> 
                        </Border> 
                    </Border> 
                </ControlTemplate> 
     
                <Style x:Key="rowStyle" TargetType="telerikGV:GridViewRow" > 
                    <Setter Property="Template" Value="{StaticResource AccountTypesTemplate}" /> 
                </Style> 
            </Grid.Resources> 
                <telerikDocking:RadDocking x:Name="docking">  
                    <telerikDocking:RadSplitContainer InitialPosition="DockedRight">  
                        <telerikDocking:RadPaneGroup> 
                            <telerikDocking:RadPane Header="Contacts">  
                                <StackPanel> 
                                    <telerikInput:RadComboBox x:Name="two" /> 
                                    <telerikInput:RadComboBox x:Name="three" /> 
                                </StackPanel> 
                            </telerikDocking:RadPane> 
                            <telerikDocking:RadPane Header="Details">  
                                <telerikInput:RadComboBox x:Name="one" /> 
     
                            </telerikDocking:RadPane> 
                        </telerikDocking:RadPaneGroup> 
                    </telerikDocking:RadSplitContainer> 
                    <telerikDocking:RadDocking.DocumentHost> 
                        <telerikDocking:RadSplitContainer> 
                            <telerikDocking:RadPaneGroup> 
                                <telerikDocking:RadPane> 
     
                                    <!--********************** CONTROLS ********************************--> 
                                    <StackPanel x:Name="MainStack" Grid.Column="0" Grid.Row="0">  
                                        <StackPanel x:Name="UserNameStack" Orientation="Horizontal">  
                                            <TextBlock Text="User Name" Margin="5,5,5,5" ></TextBlock>  
                                            <TextBox x:Name="txtUserName" Width="120" Margin="5,5,5,5"/>  
                                            <Button x:Name="btnSubmit" Click="btnSubmit_Click" Content="Submit" Margin="5,5,5,5" IsTabStop="True"/>  
                                        </StackPanel> 
                                        <StackPanel x:Name="ReportSelectStack" Visibility="Collapsed" > 
                                            <TextBlock x:Name="myFNtext" Text="Select Report from list" 
                        FontSize="11" FontWeight="Bold" Foreground="#000000" Margin="0 0 0 3" /> 
     
                                            <telerikInput:RadComboBox x:Name="cmbSelectReport" Width="auto" SelectedIndex="0" 
                            IsReadOnly="False" Text="Select Report" 
                            ItemTemplate="{StaticResource ComboBoxSelectReport}" HorizontalAlignment="Left" 
                             SelectionChanged="cmbSelectReport_SelectionChanged">  
                                            </telerikInput:RadComboBox> 
                                            <!--<telerikGridView:RadGridView x:Name="gridView" ></telerikGridView:RadGridView>--> 
                                        </StackPanel> 
                                        <!--**************Date Time Section ***********************--> 
                                        <StackPanel x:Name="DateTimeStack" Visibility="Collapsed" Width="420" HorizontalAlignment="Left">  
                                            <telerik:RadExpander IsExpanded="False"  x:Name="Date_n_Time_expander" Header="Date/Time">  
                                                <Border  BorderBrush="#FF292E97" BorderThickness="5,5,5,5" CornerRadius="10,10,10,10">  
                                                    <StackPanel> 
                                                        <!-- date range --> 
                                                        <StackPanel Orientation="Horizontal" Width="auto">  
                                                            <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top"  Text="Select Date Range:"  Margin="5,5,10,5"/>  
                                                            <telerikInput:RadComboBox x:Name="cmbDateRange" ToolTipService.ToolTip="Select a predefined date range" SelectedIndex="0"   
                                          DisplayMemberPath="Value" HorizontalAlignment="Left"   
                                          VerticalAlignment="Top" Width="200"   
                                          SelectionChanged="cmbDateRange_SelectionChanged"/>  
                                                        </StackPanel> 
                                                        <StackPanel Height="auto" HorizontalAlignment="Left" VerticalAlignment="Top" Width="Auto" Orientation="Horizontal" > 
                                                            <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Text="Start:" TextWrapping="Wrap" Margin="5,5,5,5"/>  
                                                            <telerikInput:RadDatePicker x:Name="StartDate" HorizontalAlignment="Left"   
                                            VerticalAlignment="Top" Width="116" Height="26"   
                                            Margin="5,5,5,5" 
                                             /> 
                                                            <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Text="End:" TextWrapping="Wrap" Margin="5,5,5,5"/>  
                                                            <telerikInput:RadDatePicker x:Name="EndDate"  HorizontalAlignment="Left"   
                                            VerticalAlignment="Top" Width="116" Height="26"   
                                            Margin="5,5,5,5"/>  
     
                                                        </StackPanel> 
                                                        <!-- Time Range --> 
                                                        <StackPanel Orientation="Horizontal" Width="auto">  
                                                            <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top"  Text="Select Time Range:"  Margin="5,5,10,5"/>  
                                                            <telerikInput:RadComboBox x:Name="cmbTimeRange" ToolTipService.ToolTip="Select predefined time range" 
                                          DisplayMemberPath="Value"  HorizontalAlignment="Left" 
                                          VerticalAlignment="Top" Width="116" Height="26" 
                                          Margin="5,5,5,5" /> 
     
                                                        </StackPanel> 
                                                        <StackPanel Height="auto" HorizontalAlignment="Left" VerticalAlignment="Top" Width="Auto" Orientation="Horizontal" > 
                                                            <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top"  Text="Start:"  Margin="5,5,10,5"/>  
                                                            <TextBox Margin="5,5,5,5" x:Name="startTime"  Text="00:00"/>  
                                                            <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top"  Text="End:"  Margin="5,5,10,5"/>  
                                                            <TextBox Margin="5,5,5,5" x:Name="endTime" Text="23:59"/>  
                                                        </StackPanel> 
                                                        <!-- Time Zone --> 
                                                        <StackPanel Orientation="Horizontal" Width="auto">  
                                                            <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top"  Text="Time Zone:"  Margin="5,5,10,5"/>  
                                                            <telerikInput:RadComboBox x:Name="cmbTimeZone" ToolTipService.ToolTip="Select time zone" 
                                          DisplayMemberPath="Value"  HorizontalAlignment="Left" 
                                          VerticalAlignment="Top" Width="116" Height="26" 
                                          Margin="5,5,5,5" /> 
                                                        </StackPanel> 
                                                        <!-- Call Length--> 
                                                        <StackPanel Orientation="Horizontal" Width="auto">  
                                                            <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top"  Text="Call Length:"  Margin="5,5,10,5"/>  
                                                            <telerikInput:RadComboBox x:Name="cmbOperator" ToolTipService.ToolTip="Operators" 
                                          DisplayMemberPath="Value"  HorizontalAlignment="Left" 
                                          VerticalAlignment="Top" Width="30" Height="26" 
                                          Margin="5,5,5,5" /> 
                                                            <telerikInput:RadComboBox x:Name="cmbCalLength" ToolTipService.ToolTip="Select minutes" 
                                          DisplayMemberPath="Value"  HorizontalAlignment="Left" 
                                          VerticalAlignment="Top" Width="116" Height="26" 
                                          Margin="5,5,5,5" /> 
                                                        </StackPanel> 
                                                    </StackPanel> 
                                                </Border> 
                                            </telerik:RadExpander> 
                                        </StackPanel> 
                                        <!--********************Account Section *****************************--> 
                                        <StackPanel x:Name="AcountsStack" Visibility="Collapsed">  
                                            <telerik:RadExpander x:Name="AcountsExpander"  HorizontalAlignment="Left" VerticalAlignment="Top"  Header="Accounts">  
     
                                                <Border  BorderBrush="#FF292E97" BorderThickness="5,5,5,5" CornerRadius="10,10,10,10">  
                                                    <Grid x:Name="AccountsGridLauout" Height="Auto" Width="auto">  
                                                        <Grid.RowDefinitions> 
                                                            <RowDefinition Height="30" /> 
                                                            <!--<RowDefinition Height="30" />--> 
                                                            <RowDefinition Height="*" /> 
                                                        </Grid.RowDefinitions> 
                                                        <Grid.ColumnDefinitions> 
                                                            <ColumnDefinition Width=".5*" /> 
                                                            <ColumnDefinition Width=".5*" /> 
                                                        </Grid.ColumnDefinitions> 
     
                                                        <CheckBox Content="Select/Unselect All" Grid.Column="0" Grid.Row="0" x:Name="chkSel_Unsel" Checked="chkSel_Unsel_Checked" Unchecked="chkSel_Unsel_Checked" Margin="5,5,5,5"/>  
                                                        <telerikInput:RadComboBox Grid.Column="1" Grid.Row="0" ToolTipService.ToolTip="Select groups" x:Name="cmbSelectGroup" Margin="5,5,5,5" SelectionChanged="cmbSelectGroup_SelectionChanged"></telerikInput:RadComboBox> 
                                                        <!--<telerikInput:RadComboBox Grid.Column="1" Grid.Row="0" ToolTipService.ToolTip="Filter on group" x:Name="cmbShowAll" Margin="5,5,5,5" SelectionChanged="cmbShowAll_SelectionChanged"></telerikInput:RadComboBox> 
                <telerikInput:RadComboBox Grid.Column="1" Grid.Row="1" ToolTipService.ToolTip="Sort by field" x:Name="cmbSortBy" Margin="5,5,5,5" SelectionChanged="cmbSortBy_SelectionChanged"></telerikInput:RadComboBox>--> 
                                                        <telerikGridView:RadGridView Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2"    
                                    x:Name="gridMultiSelect_accounts" ColumnsWidthMode="Auto"   
                                    Width="auto" Height="330" VerticalGridlinesBrush="Transparent"   
                                    UseAlternateRowStyle="True" AutoGenerateColumns="False" ShowGroupPanel="False" 
                                    MultipleSelect="True" Margin="5,5,5,5" > 
     
                                                            <telerikGridView:RadGridView.Columns > 
                                                                <telerikGridView:GridViewColumn HeaderText="Select">  
                                                                    <telerikGridView:GridViewColumn.CellTemplate> 
                                                                        <DataTemplate> 
                                                                            <CheckBox HorizontalAlignment="Center" VerticalAlignment="Center" Loaded="CheckBox_Loaded"/>  
                                                                        </DataTemplate> 
                                                                    </telerikGridView:GridViewColumn.CellTemplate> 
                                                                </telerikGridView:GridViewColumn> 
                                                                <telerikGridView:GridViewDataColumn HeaderText="Phone" DataMemberPath="Value"/>  
                                                                <telerikGridView:GridViewDataColumn HeaderText="Account Description" DataMemberPath="Description"/>  
                                                                <telerikGridView:GridViewDataColumn HeaderText="Group" DataMemberPath="GroupName"/>  
                                                            </telerikGridView:RadGridView.Columns> 
                                                        </telerikGridView:RadGridView> 
                                                    </Grid> 
     
                                                </Border> 
                                            </telerik:RadExpander> 
                                        </StackPanel> 
                                    </StackPanel> 
     
                                </telerikDocking:RadPane> 
                            </telerikDocking:RadPaneGroup> 
                        </telerikDocking:RadSplitContainer> 
                    </telerikDocking:RadDocking.DocumentHost> 
                </telerikDocking:RadDocking> 
     
        </Grid> 
                                  
                         
                      
                  
     
                                          
                                          
                                      
              
        </ScrollViewer> 
     
    </UserControl> 
     

    Any suggestion are greately appreciated.  Thanks!
  2. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 22 Jun 2009 Link to this post

    Hi Hector,

    We were not able to reproduce the problem you described. I tested your code with the latest binaries available under the Latest Internal Builds section of your Downloads. Hence, I suggest that you download them and give them a go.

    Hope this helps.

    Greetings,
    Kaloyan
    the Telerik team

    Instantly find answers to your questions on the newTelerik Support Portal.
    Check out the tipsfor optimizing your support resource searches.
Back to Top