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

NullReferenceException thrown in 'OnIsPinnedChanged'...

5 Answers 106 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 28 Oct 2011, 04:24 PM
Hello,

I am getting the same error as this post but I am using the RadDock correctly as far as I can tell...  The error occurs when the user preferences are to have both the right and bottom panes unpinned and we apply those preferences to the page.
System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.RadPane.OnIsPinnedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at Telerik.Windows.PropertyMetadata.PropertyChangeHook.OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
   at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
   at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Telerik.Windows.Controls.Docking.DockingLayoutFactory.ReadProperty(Dictionary`2 attributes, DependencyObject d, DependencyProperty property, String propertyName, Converter`2 parser)
   at Telerik.Windows.Controls.Docking.DockingLayoutFactory.LoadPane(XmlReader reader)
   at Telerik.Windows.Controls.Docking.DockingLayoutFactory.LoadPaneGroup(XmlReader reader)
   at Telerik.Windows.Controls.Docking.DockingLayoutFactory.LoadSplitItem(XmlReader reader)
   at Telerik.Windows.Controls.Docking.DockingLayoutFactory.LoadSplitContainer(XmlReader reader)
   at Telerik.Windows.Controls.Docking.DockingLayoutFactory.LoadDocking(XmlReader reader)
   at Telerik.Windows.Controls.RadDocking.LoadLayout(Stream source, Boolean raiseEventsIfNoSerializationTag)
   at Telerik.Windows.Controls.RadDocking.LoadLayout(Stream source)
   at SolutionQ.Eclipse.Silverlight.Content.Timesheet.Tabs.Timesheet.SetDockingPreference()
   at SolutionQ.Eclipse.Silverlight.Content.Timesheet.Tabs.Timesheet.TimesheetLoaded(Object sender, RoutedEventArgs e)
   at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)

My xaml is as follows:

<telerik:RadDocking x:Name="radDocking" PaneStateChange="RadDockingPaneStateChange" Grid.Row="0" Grid.Column="0" telerik:StyleManager.Theme="Windows7" Background="Transparent" BorderBrush="Transparent" BorderThickness="0" Padding="0" LayoutChangeEnded="RadDockingLayoutChangeEnded"  telerik:RadDocking.SerializationTag="radDocking">
 
                <!-- Main Content -->
                <telerik:RadDocking.DocumentHost>
                    <telerik:RadSplitContainer x:Name="splitter" telerik:RadDocking.SerializationTag="splitter">
                        <telerik:RadPaneGroup x:Name="RadPaneGroupMain" DocumentHostTemplate="{StaticResource style_TablessDocumentHostTemplate}" telerik:RadDocking.SerializationTag="RadPaneGroupMain">
                            <telerik:RadPane x:Name="PaneMain" CanUserClose="False" CanFloat="False" CanUserPin="False" telerik:RadDocking.SerializationTag="PaneMain">
<!-- Some stuff -->
 
                            </telerik:RadPane>
                        </telerik:RadPaneGroup>
                    </telerik:RadSplitContainer>
                </telerik:RadDocking.DocumentHost>
 
                <!-- Panels (Bottom) -->
                <telerik:RadSplitContainer x:Name="BottomContainer" InitialPosition="DockedBottom" telerik:RadDocking.SerializationTag="BottomContainer">
                    <telerik:RadPaneGroup x:Name="grpBottom" telerik:RadDocking.SerializationTag="grpBottom">
                        <telerik:RadPane x:Name="panePendingChanges" Title="x" TitleTemplate="{StaticResource dt_TimesheetPendingChangesHeaderTitle}" Header="y" HeaderTemplate="{StaticResource dt_TimesheetPendingChangesHeaderTitle}" CanUserClose="False" CanFloat="False" CanDockInDocumentHost="False" ContextMenuTemplate="{x:Null}"  telerik:RadDocking.SerializationTag="panePendingChanges">
                            <Controls:PendingChanges x:Name="pendingChanges"></Controls:PendingChanges>
                        </telerik:RadPane>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
 
                <!-- Panels (Right) -->
                <telerik:RadSplitContainer x:Name="RightContainer" InitialPosition="DockedRight" telerik:RadDocking.SerializationTag="RightContainer">
                    <telerik:RadPaneGroup x:Name="grpRight" telerik:RadDocking.SerializationTag="grpRight">
                        <telerik:RadPane x:Name="paneNATasks" Title="x" TitleTemplate="{StaticResource dt_TimesheetNATasksTitle}" Header="y" HeaderTemplate="{StaticResource dt_TimesheetNATasksHeader}" CanUserClose="False" CanFloat="False" CanDockInDocumentHost="False" ContextMenuTemplate="{x:Null}"  telerik:RadDocking.SerializationTag="paneNATasks">
                            <Controls:OutsideDateTasks x:Name="outsideDateTasks"></Controls:OutsideDateTasks>
                        </telerik:RadPane>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
 
            </telerik:RadDocking>

Am I doing somethign incorrectly, or is this a bug?  I am currently using version 2011.2.920.1040.

5 Answers, 1 is accepted

Sort by
0
PJ Melies
Top achievements
Rank 1
answered on 02 Nov 2011, 01:10 AM
We are also getting this error.  We get this error when we call LoadLayout(stream) if the saved stream contains a pane that was not pinned (collapsed) but was originally docked and pinned in the xaml.  We too are using 2011.2.920.1040. 

The LoadLayout() functionality was working in our previous version of our app but we've made changes including upgrading to the 2011.2.920.1040 version and rearranging the XAML so that the RadDocking is no longer the root element in the control.  Is this a bug that was introduced in this version?

Here's the exception we're seeing.

System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.RadPane.OnIsPinnedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at Telerik.Windows.PropertyMetadata.PropertyChangeHook.OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
   at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
   at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Telerik.Windows.Controls.Docking.DockingLayoutFactory.ReadProperty(Dictionary`2 attributes, DependencyObject d, DependencyProperty property, String propertyName, Converter`2 parser)
   at Telerik.Windows.Controls.Docking.DockingLayoutFactory.LoadPane(XmlReader reader)
   at Telerik.Windows.Controls.Docking.DockingLayoutFactory.LoadPaneGroup(XmlReader reader)
   at Telerik.Windows.Controls.Docking.DockingLayoutFactory.LoadSplitItem(XmlReader reader)
   at Telerik.Windows.Controls.Docking.DockingLayoutFactory.LoadSplitContainer(XmlReader reader)
   at Telerik.Windows.Controls.Docking.DockingLayoutFactory.LoadDocking(XmlReader reader)
   at Telerik.Windows.Controls.RadDocking.LoadLayout(Stream source, Boolean raiseEventsIfNoSerializationTag)
   at Telerik.Windows.Controls.RadDocking.LoadLayout(Stream source)
   at SilverlightComponents.UserControls.ContactsGrid.GlobalServicesService_GetDockLayoutCompleted(Object sender, GetUserPreferenceCompletedEventArgs e)
0
Boyan
Telerik team
answered on 02 Nov 2011, 02:26 PM
Hello,

We introduced this issue with SP1 release, but it is already fixed and the fix is available in the latest internal build. It will be included in Q3 release which is scheduled for the mid November.

Regards,
Boyan
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Frank
Top achievements
Rank 1
answered on 15 Nov 2011, 02:09 PM
Hello,

although this is a issue of your WPF components I want to ask it here as it seems to be similar.

I'm getting the same exception using a defined IsPinned value and the LoadLayout method using the latest beta version of your WPF components 2011.3.1020.40. Is this the same issue and will it be fixed soon?
0
Frank
Top achievements
Rank 1
answered on 17 Nov 2011, 10:03 AM
I just installed the final Q3 release of the WPF components and the issue is fixed.

Thank you.
0
Boyan
Telerik team
answered on 18 Nov 2011, 02:14 PM
Hello Frank,

I am glad that your issue is fixed. It was a bug in our Save/Load feature that we fixed after the Beta.

Best wishes,
Boyan
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Docking
Asked by
Rob
Top achievements
Rank 1
Answers by
PJ Melies
Top achievements
Rank 1
Boyan
Telerik team
Frank
Top achievements
Rank 1
Share this question
or