Exception Occurs When Unpinning All Windows

3 posts, 1 answers
  1. Joe
    Joe avatar
    2 posts
    Member since:
    Jan 2008

    Posted 22 Dec 2009 Link to this post

    Greets,

    I am running into an issue where I receive an exception when using the "HasDocumentHost" set to false on the outer docking container.  When I do this and either un-pin all of the windows or set all of them to auto-hide, the last window, upon collapsing, will cause the exception as it is being hidden.  Below is the exception that I receive:

    Message: Unhandled Error in Silverlight Application
    Code: 4004   
    Category: ManagedRuntimeError      
    Message: System.InvalidOperationException: Sequence contains no matching element
       at System.Linq.Enumerable.Last[TSource](IEnumerable`1 source, Func`2 predicate)
       at Telerik.Windows.Controls.DockingPanel.ArrangeOverride(Size finalSize)
       at System.Windows.FrameworkElement.ArrangeOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)

    Below is the XAML that I am using which causes the exception:
    <UserControl x:Class="BaseSilverlightPrototyping.MainPage" 
                 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:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
                 xmlns:local="clr-namespace:BaseSilverlightPrototyping" 
                 xmlns:c="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" 
                 xmlns:r="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" 
                 xmlns:rd="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking" 
                 xmlns:clr="clr-namespace:System;assembly=mscorlib" 
                 mc:Ignorable="d">  
     
        <Grid> 
            <Grid.RowDefinitions> 
                <RowDefinition Height="Auto" /> 
                <RowDefinition /> 
            </Grid.RowDefinitions> 
     
            <StackPanel Grid.Row="0" 
                        Orientation="Horizontal">  
                <Button Width="24" 
                        Height="24" 
                        Content="A" 
                        Margin="2" /> 
                <Button Width="24" 
                        Height="24" 
                        Content="B" 
                        Margin="2" /> 
                <Button Width="24" 
                        Height="24" 
                        Content="C" 
                        Margin="2" /> 
                <Button Width="24" 
                        Height="24" 
                        Content="D" 
                        Margin="2" /> 
                <Button Width="24" 
                        Height="24" 
                        Content="E" 
                        Margin="2" /> 
            </StackPanel> 
     
            <rd:RadDocking Grid.Row="1" 
                           x:Name="MainDocking" 
                           HorizontalContentAlignment="Stretch" 
                           HasDocumentHost="False">  
     
                <rd:RadSplitContainer> 
     
                    <rd:RadSplitContainer Orientation="Horizontal" 
                                          InitialPosition="DockedLeft">  
     
                        <rd:RadPaneGroup> 
                            <rd:RadPane Title="Pane 1" /> 
                        </rd:RadPaneGroup> 
     
                    </rd:RadSplitContainer> 
     
                    <rd:RadSplitContainer Orientation="Vertical" 
                                          InitialPosition="DockedLeft" 
                                          rd:DockingPanel.Dock="Right">  
                        <rd:RadPaneGroup> 
                            <rd:RadPane Title="Pane 2" /> 
                        </rd:RadPaneGroup> 
     
                        <rd:RadPaneGroup> 
                            <rd:RadPane Title="Pane 3" /> 
                        </rd:RadPaneGroup> 
                    </rd:RadSplitContainer> 
                </rd:RadSplitContainer> 
            </rd:RadDocking> 
     
        </Grid> 
    </UserControl> 
     

    Please let me know if there is something I have overlooked.  I am using the 2009_3_1219_Trial version (internal build).

    Regards,

    Joe
  2. Answer
    Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 24 Dec 2009 Link to this post

    Hello Joe,

     Thank you for pointing us this issue out! We fixed the problem and the fix will be included in the next internal build.

    Greetings,
    Miroslav Nedyalkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Joe
    Joe avatar
    2 posts
    Member since:
    Jan 2008

    Posted 24 Dec 2009 Link to this post

    Excellent to hear, thank you much!
Back to Top