Quantcast
Channel: Silverlight Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 801

Closed Issue: ListPicker with ListPickerMode set to "Full" causes recovery after tombstoning to fail [8137]

$
0
0
On Windows Phone 7, if the application is tombstoned while displaying a page containing a ListPicker, with ListPickerMode set to Full, and later re-activated by the user, a System.InvalidOperationException exception is thrown in the page constructor (during execution of the function System.Windows.Application.LoadComponent(this, new System.Uri("/\r\n;component/\r\n.xaml", System.UriKind.Relative)); in the generated \r\n.g.i.cs.

The message in the exception is:
"To get SystemTray visibility the RootVisual must be a PhoneApplicationFrame and its Content must be a PhoneApplicationPage"

The stack trace of the exception shows:

at Microsoft.Phone.Shell.SystemTray.get_IsVisible()
at Microsoft.Phone.Controls.ListPicker.OnListPickerModeChanged(ListPickerMode oldValue, ListPickerMode newValue)
at Microsoft.Phone.Controls.ListPicker.OnListPickerModeChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object newValue, Object oldValue)
at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isSetByStyle, Boolean isSetByBuiltInStyle, PropertyInvalidationReason reason)
at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value)
at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
at Microsoft.Phone.Controls.ListPicker.set_ListPickerMode(ListPickerMode value)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(RuntimeMethodInfo rtmi, Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess, StackCrawlMark& stackMark)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, StackCrawlMark& stackMark)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at MS.Internal.FrameworkCallbacks.SetPropertyOrAddItem(Object target, PropertyInfo propertyInfo, Object value, Int32 typeIndex, String propertyName)
at MS.Internal.FrameworkCallbacks.SetNonAttachedProperty(Object target, String propertyName, Object propertyValue, Int32 typeIndex)
at MS.Internal.FrameworkCallbacks.SetValueToProperty(Object target, String propertyName, Object propertyValue, Int32 typeIndex, String attachedDPOwnerNamespace, String attachedDPOwnerAssembly)
at MS.Internal.FrameworkCallbacks.SetPropertyAttribute(IntPtr nativeTarget, String attrName, String attrValue, String attachedDPOwnerNamespace, String attachedDPOwnerAssembly)
at MS.Internal.XcpImports.Application_LoadComponentNative(IntPtr pContext, IntPtr pComponent, UInt32 cUriStringLength, String uriString, UInt32 cXamlStrLength, Byte* pXamlStr)
at MS.Internal.XcpImports.Application_LoadComponent(INativeCoreTypeWrapper componentAsDO, String resourceLocator, UnmanagedMemoryStream stream, UInt32 numBytesToRead)
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at MyApp.MyAppPage.InitializeComponent()
at MyApp.MyAppPage..ctor()
at System.Reflection.RuntimeConstructorInfo.InternalInvoke(RuntimeConstructorInfo rtci, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess, StackCrawlMark& stackMark)
at System.Reflection.RuntimeConstructorInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, StackCrawlMark& stackMark)
at System.Activator.InternalCreateInstance(Type type, Boolean nonPublic, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type)
at System.Windows.Navigation.PageResourceContentLoader.BeginLoad_OnUIThread(AsyncCallback userCallback, PageResourceContentLoaderAsyncResult result)
at System.Windows.Navigation.PageResourceContentLoader.<>c__DisplayClass4.<BeginLoad>b__0(Object args)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(RuntimeMethodInfo rtmi, Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess, StackCrawlMark& stackMark)
at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, StackCrawlMark& stackMark)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at System.Delegate.DynamicInvokeOne(Object[] args)
at System.MulticastDelegate.DynamicInvokeImpl(Object[] args)
at System.Delegate.DynamicInvoke(Object[] args)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.Dispatch(DispatcherPriority priority)
at System.Windows.Threading.Dispatcher.OnInvoke(Object context)
at System.Windows.Hosting.CallbackCookie.Invoke(Object[] args)
at System.Windows.Hosting.DelegateWrapper.InternalInvoke(Object[] args)
at System.Windows.RuntimeHost.ManagedHost.InvokeDelegate(IntPtr pHandle, Int32 nParamCount, ScriptParam[] pParams, ScriptParam& pResult)


Workaround:
The exception doesn't occur if ListPickerMode is set to either Normal or Expanded. So, instead of selecting Full, select one of the other two modes and set ItemCountThreshold to 0 (zero). This will cause the ListPicker to operate in Full mode.
Comments:

ListPickerMode is now read-only in the latest toolkit.


Viewing all articles
Browse latest Browse all 801

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>