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

NullReference Exception when docking panes

1 Answer 81 Views
Docking
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 2
John asked on 18 Dec 2009, 09:44 AM
I am using a RadDocking control for Silverlight and am frequently getting NullReference exceptions when panes are dragged around and re-docked that I am having trouble fixing. 

The call stack shows no entries for my own code, it's entirely Windows and Telerik entries and while when not running under the debugger the application continues to function, but something must be wrong and I would like to find what I'm doing wrong.

I've attached a couple of image files showing a reproduction of the problem.  The first is the layout of panes at startup, the second shows me dragging the 'Options' pane off it's docked position and while still holding down the mouse button trying to re-dock it back where it started and the third shows the exception and call stack that results when I release the mouse button.  I've also attached the XAML for the pane layout for reference.

Does anyone know what could be causing this?  or have any suggestions for things to try as I am currently stumped?

thanks in advance.

<UserControl xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" 
        x:Class="MetricViewer.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:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" 
        xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" 
        xmlns:telerikPanels="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls" 
        xmlns:telerikDock="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking" 
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" 
        xmlns:telerikChart="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting" 
        xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input" 
        mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">  
    <Grid> 
        <Grid.RowDefinitions> 
            <RowDefinition Height="26" /> 
            <RowDefinition /> 
        </Grid.RowDefinitions> 
 
        <Grid.ColumnDefinitions> 
            <ColumnDefinition /> 
        </Grid.ColumnDefinitions> 
 
        <telerikNavigation:RadMenu x:Name="AppMenu" Grid.Row="0" Grid.Column="0" VerticalAlignment="Top" 
                ClickToOpen="False" ItemClick="OnAppMenuItemClick">  
                         ...menu contents omitted for brevity...  
        </telerikNavigation:RadMenu> 
        <telerikDock:RadDocking Grid.Row="1" Grid.Column="0">  
            <telerikDock:RadDocking.DocumentHost> 
                <telerikDock:RadSplitContainer> 
                    <telerikDock:RadPaneGroup x:Name="MainPaneGroup">  
                        <telerikDock:RadPane Header="Visualisation">  
                            <navigation:Frame x:Name="GraphArea" Source="/Graphs/BlankGraph.xaml" 
                                    JournalOwnership="OwnsJournal" /> 
                        </telerikDock:RadPane> 
                        <telerikDock:RadPane x:Name="SampleDataGridPane" Header="Sample Data Grid">  
                            <navigation:Frame x:Name="SampleDataGridArea" Source="/SampleDataGrid.xaml" 
                                    JournalOwnership="OwnsJournal" /> 
                        </telerikDock:RadPane> 
                        <telerikDock:RadPane Header="Requests">  
                            <ListBox Margin="10,10,10,10" x:Name="DebugListBox" HorizontalAlignment="Left" 
                                    VerticalAlignment="Top" /> 
                        </telerikDock:RadPane> 
                    </telerikDock:RadPaneGroup> 
                </telerikDock:RadSplitContainer> 
            </telerikDock:RadDocking.DocumentHost> 
 
            <telerikDock:RadSplitContainer telerikDock:DockingPanel.InitialSize="150,150" MaxWidth="600" 
                    InitialPosition="DockedLeft">  
                <telerikDock:RadPaneGroup> 
                    <telerikDock:RadPane Header="Queries">  
                        <navigation:Frame x:Name="QueriesArea" Source="/QueryTree.xaml" JournalOwnership="OwnsJournal" /> 
                    </telerikDock:RadPane> 
                </telerikDock:RadPaneGroup> 
            </telerikDock:RadSplitContainer> 
 
            <telerikDock:RadSplitContainer telerikDock:DockingPanel.InitialSize="150,200" MaxWidth="1600" 
                    telerikDock:ProportionalStackPanel.RelativeSize="50, 50" InitialPosition="DockedBottom">  
                <telerikDock:RadPaneGroup> 
                    <telerikDock:RadPane Header="Time Range">  
                        <navigation:Frame x:Name="TimeRangeArea" Source="/TimeRange.xaml" JournalOwnership="OwnsJournal" /> 
                    </telerikDock:RadPane> 
                </telerikDock:RadPaneGroup> 
                <telerikDock:RadPaneGroup> 
                    <telerikDock:RadPane Header="Graph Options">  
                        <navigation:Frame x:Name="GraphOptionsArea" Source="/Graphs/BlankGraph.xaml" 
                                JournalOwnership="OwnsJournal" /> 
                    </telerikDock:RadPane> 
                </telerikDock:RadPaneGroup> 
            </telerikDock:RadSplitContainer> 
 
        </telerikDock:RadDocking> 
    </Grid> 
</UserControl> 
 

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 21 Dec 2009, 03:14 PM
Hello John,

Thank you for reporting this problem. Is it fixed and the fix will be available with the next Latest Internal Build.
I've updated your telerik points.

Greetings,
Hristo
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.
Tags
Docking
Asked by
John
Top achievements
Rank 2
Answers by
Hristo
Telerik team
Share this question
or