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

After update version NullReference in UpdatePositionHelper !

6 Answers 65 Views
Docking
This is a migrated thread and some comments may be shown as answers.
alexhome
Top achievements
Rank 1
alexhome asked on 23 Sep 2011, 09:16 AM
After update version to 2011.2.920.1040 from 2011.1.xx.xx, i got error:
+ $exception {System.NullReferenceException: Object reference not set to an instance of an object.
at Telerik.Windows.Controls.Docking.ToolWindow.UpdatePositionHelper(PositionHelper helper)
at Telerik.Windows.Controls.WindowBase.CheckRestrictedArea()
at Telerik.Windows.Controls.WindowBase.OnRootVisualSizeChanged()
at Telerik.Windows.Controls.WindowBase.Telerik.Windows.Controls.InternalWindow.IWindowDragAware.RootVisualSizeChanged()
at Telerik.Windows.Controls.InternalWindow.PopupWindowHost.Initialize()
at Telerik.Windows.Controls.InternalWindow.PopupWindowHost.OnPresenterLoadedForFirstTime(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)} System.Exception {System.NullReferenceException}

before i add on dock panel windows:
RadSplitContainer rsc = new RadSplitContainer(); 
rsc.InitialPosition = DockState.FloatingDockable; 
RadPaneGroup rpg = new RadPaneGroup(); 
rsc.Items.Add(rpg); 
RadPane rp = new RadPane(); 
rpg.Items.Add(rp); 
rp.ContextMenuTemplate = null
rp.Title = title; 
rp.Header = title; 
rp.Content = content; 
RadDocking.SetSerializationTag(rp, header); 
RadDocking.SetFloatingSize(rsc, new Size { Width = 400, Height = 400 }); 
dockPanel.Items.Add(rsc);

and if i load dock layout from XML
using (Stream stream = new MemoryStream(Encoding.UTF8.GetBytes(profile)))
{
    stream.Seek(0, SeekOrigin.Begin);
    dockPanel.LoadLayout(stream);
}
on exit function i have error

6 Answers, 1 is accepted

Sort by
0
alexhome
Top achievements
Rank 1
answered on 26 Sep 2011, 02:25 PM
anybody home ????????????????????
0
Miroslav Nedyalkov
Telerik team
answered on 27 Sep 2011, 09:33 AM
Hello Alexhome,

Although we review all forum threads the answer is not guaranteed. That's why if you need faster response you should post support tickets.
Now straight to the problem you have - if you are calling the LoadLayout method in the constructor of the MainPage this could be the problem. In order to make this work you might either postpone this action a little (using a Dispatcher.BeginInvoke) or to move it in the Loaded event handler. We will target this problem, but currently I cannot give you a concrete time frame.

Hope this helps.

Regards,
Miroslav Nedyalkov
the Telerik team

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

0
Matt
Top achievements
Rank 2
answered on 25 Oct 2011, 08:43 PM
I'm seeing something somewhat similar with a null ref with a stack trace of:

at Telerik.Windows.Controls.InternalWindow.PopupWindowHost.Initialize()
at Telerik.Windows.Controls.InternalWindow.PopupWindowHost.OnPresenterLoadedForFirstTime(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)

What's the status of this issue?
0
Miroslav Nedyalkov
Telerik team
answered on 26 Oct 2011, 08:48 AM
Hi Matt,

We are aware of this problem and we will target it for the 2011 Q3 release. Here is the PITS item for the issue.

All the best,
Miroslav Nedyalkov
the Telerik team

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

0
alexhome
Top achievements
Rank 1
answered on 04 Mar 2012, 10:43 PM

I download release 15 feb 2012, but the problem persists, you are promised !!!!!

i cant upgrade my project on new version radcontrol during the year !!!!!

if i execute next code by DispetcherTimer after 2 seconds, than all work fine


using (Stream stream = new MemoryStream(Encoding.UTF8.GetBytes(profile))) 
   stream.Seek(0, SeekOrigin.Begin); 
   dockPanel.LoadLayout(stream); 
}

and new bug in new release, when I create a new dialog box (radcontrol modal window), then it is in the background, and dockable window in the foreground




0
Miroslav Nedyalkov
Telerik team
answered on 05 Mar 2012, 12:22 PM
Hello Alex,

I know we promised, but the issue was postponed due to the available work-around which you found. About the other problem I would suggest you to use the dispatcher technique for both loading the layout and opening the dialog window.

Hope this helps.

Kind regards,
Miroslav Nedyalkov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Docking
Asked by
alexhome
Top achievements
Rank 1
Answers by
alexhome
Top achievements
Rank 1
Miroslav Nedyalkov
Telerik team
Matt
Top achievements
Rank 2
Share this question
or