This question is locked. New answers and comments are not allowed.
I am using the page transitions of the Windows Phone tools to add some flare to my app.
In order to do this, App.xaml.cs, I have changed the InitializePhoneApplication() method line as follows:
However, I am getting the below unhandled exception when I navigate back through the page stack reaching a page that requires a reload of data triggered in OnNavigatedTo.
System.ArgumentException
Message: The parameter is incorrect
Stack Trace:
at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
at MS.Internal.XcpImports.MethodPack(IntPtr objectPtr, String methodName, Object[] rawData)
at MS.Internal.XcpImports.UIElement_TransformToVisual(UIElement element, UIElement visual)
at System.Windows.UIElement.TransformToVisual(UIElement visual)
at Telerik.Windows.Controls.RadModalWindow.SetWindowPosition(UIElement relativeElement)
at Telerik.Windows.Controls.RadWindow.aq()
at Telerik.Windows.Controls.RadWindow.bd(Object A_0, EventArgs A_1)
at System.Windows.FrameworkElement.OnLayoutUpdated(Object sender, EventArgs e)
at MS.Internal.JoltHelper.RaiseEvent(IntPtr target, UInt32 eventId, IntPtr coreEventArgs, UInt32 eventArgsTypeIndex)
My observations:
- If the reload is not performed, the error does not occur.
- If I change the App.xaml.cs back to RootFrame = new PhoneApplicationFrame(); the error does not occur.
Please help!
Many thanks
Ian
EDIT: I have managed to bypass the error by adding a PageTransitionCompleted event handler to the page in question. The data update is fired from this event handler now (rather than the page's OnNavigatedTo) and seems OK. However, this is not ideal as the previous set of data is visible as the transition is occurring. Therefore any other suggestions are still very welcome! Thanks.
In order to do this, App.xaml.cs, I have changed the InitializePhoneApplication() method line as follows:
RootFrame = new RadPhoneApplicationFrame();
However, I am getting the below unhandled exception when I navigate back through the page stack reaching a page that requires a reload of data triggered in OnNavigatedTo.
System.ArgumentException
Message: The parameter is incorrect
Stack Trace:
at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
at MS.Internal.XcpImports.MethodPack(IntPtr objectPtr, String methodName, Object[] rawData)
at MS.Internal.XcpImports.UIElement_TransformToVisual(UIElement element, UIElement visual)
at System.Windows.UIElement.TransformToVisual(UIElement visual)
at Telerik.Windows.Controls.RadModalWindow.SetWindowPosition(UIElement relativeElement)
at Telerik.Windows.Controls.RadWindow.aq()
at Telerik.Windows.Controls.RadWindow.bd(Object A_0, EventArgs A_1)
at System.Windows.FrameworkElement.OnLayoutUpdated(Object sender, EventArgs e)
at MS.Internal.JoltHelper.RaiseEvent(IntPtr target, UInt32 eventId, IntPtr coreEventArgs, UInt32 eventArgsTypeIndex)
My observations:
- If I change the App.xaml.cs back to RootFrame = new PhoneApplicationFrame(); the error does not occur.
Please help!
Many thanks
Ian
EDIT: I have managed to bypass the error by adding a PageTransitionCompleted event handler to the page in question. The data update is fired from this event handler now (rather than the page's OnNavigatedTo) and seems OK. However, this is not ideal as the previous set of data is visible as the transition is occurring. Therefore any other suggestions are still very welcome! Thanks.