title: How to control depth of stacktrace
body: <p>Have C# WPF application using DevExpress. Catching an unhandled exception, see below, which shows System and DevExpress elements but nothing from any of my source modules. Almost certainly, one of my source modules is writing into a C# object that is bound to a DevExpress PropertyGridControl that is then throwing the exception, but which PropertyGridControl? Is there a way to expand or enlarge the stack trace depth, to see where in my source the write to the C# object is occurring?</p>
  
  <pre><code>OnDispatcherUnhandledException occurred: Collection was modified after the enumerator was instantiated. 
  at System.Collections.Specialized.ListDictionary.NodeKeyValueCollection.NodeKeyValueEnumerator.MoveNext()
  at System.Linq.Enumerable.&lt;CastIterator&gt;d__94`1.MoveNext()
  at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
  at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
  at DevExpress.Mvvm.Native.LinqExtensions.ForEach[T](IEnumerable`1 source, Action`1 action)
  at DevExpress.Xpf.PropertyGrid.Internal.DataController.InvalidateChildren(IEnumerable`1 handles)
  at DevExpress.Xpf.PropertyGrid.Internal.DataController.UpdateHandles()
  at DevExpress.Xpf.PropertyGrid.Internal.DataController.Update()
  at DevExpress.Xpf.PropertyGrid.Internal.DataViewBase.&lt;Update&gt;b__98_0()
  at DevExpress.Xpf.Core.Locker.DoLockedAction(Action action)
  at DevExpress.Xpf.Core.Locker.&lt;&gt;c__DisplayClass12_0.&lt;DoLockedActionIfNotLocked&gt;b__0()
  at DevExpress.Xpf.Core.Locker.DoIfNotLocked(Action action)
  at DevExpress.Xpf.Core.Locker.DoLockedActionIfNotLocked(Action action)
  at DevExpress.Xpf.PropertyGrid.Internal.DataViewBase.Update()
  at DevExpress.Xpf.PropertyGrid.PropertyGridControl.UpdateData()
  at DevExpress.Xpf.PropertyGrid.PropertyGridView.&lt;OnLayoutUpdated&gt;b__103_0(PropertyGridControl x)
  at DevExpress.Mvvm.Native.MayBe.Do[TI](TI input, Action`1 action)
  at DevExpress.Xpf.PropertyGrid.PropertyGridView.OnLayoutUpdated(Object sender, EventArgs e)
  at System.Windows.ContextLayoutManager.fireLayoutUpdateEvent()
  at System.Windows.ContextLayoutManager.UpdateLayout()
  at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
  at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
  at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
  at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
  at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
  at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
  at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) 
  </code></pre>