Gets an object that replaces the DataContext when an item container is removed from the visual tree.
Assembly: PresentationFramework (in PresentationFramework.dll)
Use this property if you need to deal with the DataContext of an item container. An item container is the UI element that displays an item in an ItemsControl. When an ItemsControl is data bound to a collection, an item container is generated for each item. In some cases, item containers are removed from the visual tree. Two typical cases where an item container is removed are when an item is removed from the underlying collection and when virtualization is enabled on the ItemsControl. In these cases, the DataContext property of the item container will be set to the property You should check whether the DataContext is equal to the before accessing the DataContext in the DataContextChanged event for item containers. For more information about item containers and virtualization, see the remarks in the VirtualizingStackPanel class.