System.Runtime.Serialization.SerializationException in DataGrid

Oct 7, 2009 at 7:22 AM

 

System.Runtime.Serialization.SerializationException was unhandled
  Message="Type 'System.ComponentModel.PropertyChangedEventManager' in Assembly 'WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is not marked as serializable."
  Source="mscorlib"
  StackTrace:
    Server stack trace: 
       at System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type)
       at System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context)
       at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo()
       at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter)
       at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter)
       at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo)
       at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
       at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
       at System.Runtime.Remoting.Channels.CrossAppDomainSerializer.SerializeMessageParts(ArrayList argsToSerialize)
       at System.Runtime.Remoting.Messaging.SmuggledMethodCallMessage..ctor(IMethodCallMessage mcm)
       at System.Runtime.Remoting.Messaging.SmuggledMethodCallMessage.SmuggleIfPossible(IMessage msg)
       at System.Runtime.Remoting.Channels.CrossAppDomainSink.SyncProcessMessage(IMessage reqMsg)
    Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at System.ComponentModel.INotifyPropertyChanged.add_PropertyChanged(PropertyChangedEventHandler value)
       at System.ComponentModel.PropertyChangedEventManager.StartListening(Object source)
       at System.ComponentModel.PropertyChangedEventManager.PrivateAddListener(INotifyPropertyChanged source, IWeakEventListener listener, String propertyName)
       at System.ComponentModel.PropertyChangedEventManager.AddListener(INotifyPropertyChanged source, IWeakEventListener listener, String propertyName)
       at MS.Internal.Data.PropertyPathWorker.ReplaceItem(Int32 k, Object newO, Object parent)
       at MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView, Object newValue, Boolean isASubPropertyChange)
       at MS.Internal.Data.PropertyPathWorker.AttachToRootItem(Object rootItem)
       at MS.Internal.Data.ClrBindingWorker.AttachDataItem()
       at System.Windows.Data.BindingExpression.Activate(Object item)
       at System.Windows.Data.BindingExpression.OnDataContextChanged(DependencyObject contextElement)
       at System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
       at System.Windows.Data.BindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
       at System.Windows.Data.MultiBindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
       at System.Windows.Data.MultiBindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
       at System.Windows.DependentList.InvalidateDependents(DependencyObject source, DependencyPropertyChangedEventArgs sourceArgs)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
       at System.Windows.TreeWalkHelper.OnInheritablePropertyChanged(DependencyObject d, InheritablePropertyChangeInfo info)
       at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)
       at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)
       at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)
       at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
       at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
       at System.Windows.DescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode)
       at System.Windows.TreeWalkHelper.InvalidateOnInheritablePropertyChange(FrameworkElement fe, FrameworkContentElement fce, InheritablePropertyChangeInfo info, Boolean skipStartNode)
       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       at System.Windows.Controls.ContentPresenter.OnContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
       at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp)
       at System.Windows.Data.BindingExpression.Invalidate(Boolean isASubPropertyChange)
       at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
       at System.Windows.Data.BindingExpression.Activate(Object item)
       at System.Windows.Data.BindingExpression.OnDataContextChanged(DependencyObject contextElement)
       at System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
       at System.Windows.Data.BindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
       at System.Windows.DependentList.InvalidateDependents(DependencyObject source, DependencyPropertyChangedEventArgs sourceArgs)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
       at System.Windows.DependencyObject.ClearValueCommon(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata)
       at System.Windows.DependencyObject.ClearValue(DependencyProperty dp)
       at System.Windows.Controls.ItemContainerGenerator.LinkContainerToItem(DependencyObject container, Object item, Boolean isRecycled)
       at System.Windows.Controls.ItemContainerGenerator.OnItemReplaced(Object oldItem, Object newItem, Int32 index)
       at System.Windows.Controls.ItemContainerGenerator.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Windows.Controls.ItemContainerGenerator.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
       at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
       at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
       at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
       at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
       at System.Windows.Controls.ItemCollection.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
       at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
       at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)
       at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
       at System.Windows.Data.ListCollectionView.ProcessCollectionChangedWithAdjustedIndex(NotifyCollectionChangedEventArgs args, Int32 adjustedOldIndex, Int32 adjustedNewIndex)
       at System.Windows.Data.ListCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)
       at System.Windows.Data.CollectionView.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
       at Microsoft.Windows.Controls.MultipleCopiesCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\MultipleCopiesCollection.cs:line 454
       at Microsoft.Windows.Controls.MultipleCopiesCollection.OnReplace(Object oldItem, Object newItem, Int32 index) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\MultipleCopiesCollection.cs:line 220
       at Microsoft.Windows.Controls.MultipleCopiesCollection.set_CopiedItem(Object value) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\MultipleCopiesCollection.cs:line 153
       at Microsoft.Windows.Controls.Primitives.DataGridCellsPresenter.OnItemChanged(Object oldItem, Object newItem) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\Primitives\DataGridCellsPresenter.cs:line 328
       at Microsoft.Windows.Controls.Primitives.DataGridCellsPresenter.set_Item(Object value) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\Primitives\DataGridCellsPresenter.cs:line 302
       at Microsoft.Windows.Controls.DataGridRow.OnItemChanged(Object oldItem, Object newItem) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\DataGridRow.cs:line 91
       at Microsoft.Windows.Controls.DataGridRow.NotifyPropertyChanged(DependencyObject d, String propertyName, DependencyPropertyChangedEventArgs e, NotificationTarget target) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\DataGridRow.cs:line 754
       at Microsoft.Windows.Controls.DataGridRow.NotifyPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e, NotificationTarget target) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\DataGridRow.cs:line 707
       at Microsoft.Windows.Controls.DataGridRow.OnNotifyRowPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\DataGridRow.cs:line 635
       at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at Microsoft.Windows.Controls.DataGridRow.OnPropertyChanged(DependencyPropertyChangedEventArgs e) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\DataGridRow.cs:line 299
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)
       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       at Microsoft.Windows.Controls.DataGridRow.set_Item(Object value) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\DataGridRow.cs:line 72
       at Microsoft.Windows.Controls.DataGridRow.PrepareRow(Object item, DataGrid owningDataGrid) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\DataGridRow.cs:line 327
       at Microsoft.Windows.Controls.DataGrid.PrepareContainerForItemOverride(DependencyObject element, Object item) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\DataGrid.cs:line 794
       at System.Windows.Controls.ItemsControl.MS.Internal.Controls.IGeneratorHost.PrepareItemContainer(DependencyObject container, Object item)
       at System.Windows.Controls.ItemContainerGenerator.System.Windows.Controls.Primitives.IItemContainerGenerator.PrepareItemContainer(DependencyObject container)
       at System.Windows.Controls.VirtualizingStackPanel.InsertContainer(Int32 childIndex, UIElement container, Boolean isRecycled)
       at System.Windows.Controls.VirtualizingStackPanel.AddContainerFromGenerator(Int32 childIndex, UIElement child, Boolean newlyRealized)
       at System.Windows.Controls.VirtualizingStackPanel.MeasureOverride(Size constraint)
       at Microsoft.Windows.Controls.Primitives.DataGridRowsPresenter.MeasureOverride(Size constraint) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\Primitives\DataGridRowsPresenter.cs:line 118
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       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, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
       at System.Threading.ExecutionContext.runTryCode(Object userData)
       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.Run()
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
       at Client.App.Main()
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
       at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
       at System.Activator.CreateInstance(ActivationContext activationContext)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 

Hi

I have a DataGrid with ObservableCollection as a source. Elements in the collection get updated in code-behind in response to external events. Collection receives a Replace event.

Very frequently i am observing the exception below. This problem existed in March edition of DataGrid, so i switched to the latest release - still the same problem.

I marked the following as  [field: NonSerialized]

public event NotifyCollectionChangedEventHandler CollectionChanged; and public event PropertyChangedEventHandler PropertyChanged; in MultipleCopiesCollection.cs hoping it would resolve the issue.

However it reproes very frequently, I'd say on about 60% of updates

thanks

-----------------------------

System.Runtime.Serialization.SerializationException was unhandled

  Message="Type 'System.ComponentModel.PropertyChangedEventManager' in Assembly 'WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is not marked as serializable."

  Source="mscorlib"

  StackTrace:

    Server stack trace: 

       at System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type)

       at System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context)

       at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo()

       at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter)

       at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter)

       at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo)

       at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)

       at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)

       at System.Runtime.Remoting.Channels.CrossAppDomainSerializer.SerializeMessageParts(ArrayList argsToSerialize)

       at System.Runtime.Remoting.Messaging.SmuggledMethodCallMessage..ctor(IMethodCallMessage mcm)

       at System.Runtime.Remoting.Messaging.SmuggledMethodCallMessage.SmuggleIfPossible(IMessage msg)

       at System.Runtime.Remoting.Channels.CrossAppDomainSink.SyncProcessMessage(IMessage reqMsg)

    Exception rethrown at [0]: 

       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

       at System.ComponentModel.INotifyPropertyChanged.add_PropertyChanged(PropertyChangedEventHandler value)

       at System.ComponentModel.PropertyChangedEventManager.StartListening(Object source)

       at System.ComponentModel.PropertyChangedEventManager.PrivateAddListener(INotifyPropertyChanged source, IWeakEventListener listener, String propertyName)

       at System.ComponentModel.PropertyChangedEventManager.AddListener(INotifyPropertyChanged source, IWeakEventListener listener, String propertyName)

       at MS.Internal.Data.PropertyPathWorker.ReplaceItem(Int32 k, Object newO, Object parent)

       at MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView, Object newValue, Boolean isASubPropertyChange)

       at MS.Internal.Data.PropertyPathWorker.AttachToRootItem(Object rootItem)

       at MS.Internal.Data.ClrBindingWorker.AttachDataItem()

       at System.Windows.Data.BindingExpression.Activate(Object item)

       at System.Windows.Data.BindingExpression.OnDataContextChanged(DependencyObject contextElement)

       at System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)

       at System.Windows.Data.BindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)

       at System.Windows.Data.MultiBindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)

       at System.Windows.Data.MultiBindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)

       at System.Windows.DependentList.InvalidateDependents(DependencyObject source, DependencyPropertyChangedEventArgs sourceArgs)

       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)

       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)

       at System.Windows.TreeWalkHelper.OnInheritablePropertyChanged(DependencyObject d, InheritablePropertyChangeInfo info)

       at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d)

       at System.Windows.DescendentsWalker`1.VisitNode(FrameworkElement fe)

       at System.Windows.DescendentsWalker`1.VisitNode(DependencyObject d)

       at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)

       at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)

       at System.Windows.DescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode)

       at System.Windows.TreeWalkHelper.InvalidateOnInheritablePropertyChange(FrameworkElement fe, FrameworkContentElement fce, InheritablePropertyChangeInfo info, Boolean skipStartNode)

       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)

       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)

       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)

       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)

       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)

       at System.Windows.Controls.ContentPresenter.OnContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)

       at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)

       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)

       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)

       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)

       at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp)

       at System.Windows.Data.BindingExpression.Invalidate(Boolean isASubPropertyChange)

       at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)

       at System.Windows.Data.BindingExpression.Activate(Object item)

       at System.Windows.Data.BindingExpression.OnDataContextChanged(DependencyObject contextElement)

       at System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)

       at System.Windows.Data.BindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)

       at System.Windows.DependentList.InvalidateDependents(DependencyObject source, DependencyPropertyChangedEventArgs sourceArgs)

       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)

       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)

       at System.Windows.DependencyObject.ClearValueCommon(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata)

       at System.Windows.DependencyObject.ClearValue(DependencyProperty dp)

       at System.Windows.Controls.ItemContainerGenerator.LinkContainerToItem(DependencyObject container, Object item, Boolean isRecycled)

       at System.Windows.Controls.ItemContainerGenerator.OnItemReplaced(Object oldItem, Object newItem, Int32 index)

       at System.Windows.Controls.ItemContainerGenerator.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)

       at System.Windows.Controls.ItemContainerGenerator.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)

       at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)

       at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)

       at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)

       at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)

       at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)

       at System.Windows.Controls.ItemCollection.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)

       at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)

       at System.Windows.WeakEventManager.DeliverEvent(Object sender, EventArgs args)

       at System.Collections.Specialized.CollectionChangedEventManager.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)

       at System.Windows.Data.CollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)

       at System.Windows.Data.ListCollectionView.ProcessCollectionChangedWithAdjustedIndex(NotifyCollectionChangedEventArgs args, Int32 adjustedOldIndex, Int32 adjustedNewIndex)

       at System.Windows.Data.ListCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)

       at System.Windows.Data.CollectionView.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)

       at Microsoft.Windows.Controls.MultipleCopiesCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\MultipleCopiesCollection.cs:line 454

       at Microsoft.Windows.Controls.MultipleCopiesCollection.OnReplace(Object oldItem, Object newItem, Int32 index) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\MultipleCopiesCollection.cs:line 220

       at Microsoft.Windows.Controls.MultipleCopiesCollection.set_CopiedItem(Object value) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\MultipleCopiesCollection.cs:line 153

       at Microsoft.Windows.Controls.Primitives.DataGridCellsPresenter.OnItemChanged(Object oldItem, Object newItem) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\Primitives\DataGridCellsPresenter.cs:line 328

       at Microsoft.Windows.Controls.Primitives.DataGridCellsPresenter.set_Item(Object value) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\Primitives\DataGridCellsPresenter.cs:line 302

       at Microsoft.Windows.Controls.DataGridRow.OnItemChanged(Object oldItem, Object newItem) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\DataGridRow.cs:line 91

       at Microsoft.Windows.Controls.DataGridRow.NotifyPropertyChanged(DependencyObject d, String propertyName, DependencyPropertyChangedEventArgs e, NotificationTarget target) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\DataGridRow.cs:line 754

       at Microsoft.Windows.Controls.DataGridRow.NotifyPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e, NotificationTarget target) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\DataGridRow.cs:line 707

       at Microsoft.Windows.Controls.DataGridRow.OnNotifyRowPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\DataGridRow.cs:line 635

       at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)

       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)

       at Microsoft.Windows.Controls.DataGridRow.OnPropertyChanged(DependencyPropertyChangedEventArgs e) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\DataGridRow.cs:line 299

       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)

       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)

       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal)

       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)

       at Microsoft.Windows.Controls.DataGridRow.set_Item(Object value) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\DataGridRow.cs:line 72

       at Microsoft.Windows.Controls.DataGridRow.PrepareRow(Object item, DataGrid owningDataGrid) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\DataGridRow.cs:line 327

       at Microsoft.Windows.Controls.DataGrid.PrepareContainerForItemOverride(DependencyObject element, Object item) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\DataGrid.cs:line 794

       at System.Windows.Controls.ItemsControl.MS.Internal.Controls.IGeneratorHost.PrepareItemContainer(DependencyObject container, Object item)

       at System.Windows.Controls.ItemContainerGenerator.System.Windows.Controls.Primitives.IItemContainerGenerator.PrepareItemContainer(DependencyObject container)

       at System.Windows.Controls.VirtualizingStackPanel.InsertContainer(Int32 childIndex, UIElement container, Boolean isRecycled)

       at System.Windows.Controls.VirtualizingStackPanel.AddContainerFromGenerator(Int32 childIndex, UIElement child, Boolean newlyRealized)

       at System.Windows.Controls.VirtualizingStackPanel.MeasureOverride(Size constraint)

       at Microsoft.Windows.Controls.Primitives.DataGridRowsPresenter.MeasureOverride(Size constraint) in d:\Projects\n7\branches\DALIntegration\Client\External\WPF\Toolkit.June\DataGrid\Microsoft\Windows\Controls\Primitives\DataGridRowsPresenter.cs:line 118

       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)

       at System.Windows.UIElement.Measure(Size availableSize)

       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, Boolean isSingleParameter)

       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)

       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)

       at System.Windows.Threading.DispatcherOperation.InvokeImpl()

       at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)

       at System.Threading.ExecutionContext.runTryCode(Object userData)

       at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)

       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)

       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

       at System.Windows.Threading.DispatcherOperation.Invoke()

       at System.Windows.Threading.Dispatcher.ProcessQueue()

       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)

       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)

       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)

       at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)

       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)

       at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)

       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)

       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)

       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)

       at System.Windows.Threading.Dispatcher.Run()

       at System.Windows.Application.RunDispatcher(Object ignore)

       at System.Windows.Application.RunInternal(Window window)

       at System.Windows.Application.Run(Window window)

       at System.Windows.Application.Run()

       at Client.App.Main()

       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)

       at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)

       at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)

       at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()

       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)

       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)

       at System.Activator.CreateInstance(ActivationContext activationContext)

       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()

       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)

       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

       at System.Threading.ThreadHelper.ThreadStart()

  InnerException: