There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
ArgumentException caused by default name of "LayoutRoot"
If adrotatorcontrol is in a virtualized container (ListBox), or in a container named "LayoutRoot", the adrotatorcontrol can and will crash the hosting application with the following exception:
Message: Value cannot be null.
Stack Trace: at System.Windows.PresentationFrameworkCollection
1.AddDependencyObject(DependencyObject value)1.Add(T value)
at System.Windows.Controls.UIElementCollection.AddInternal(UIElement value)
at AdRotator.AdRotatorControl.Invalidate(Boolean selectNextAdType)
Sometimes this can be hard to reproduce, but after reproducing once you will crash the application constantly. This can be fixed by renaming the default container grid for the AdRotatorControl named "LayoutRoot" to something else. Also, you can catch
this exception where the ad control is created and added to the control. This has caused about 700 crashes on our app and was only caught when in release mode on the store.