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.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.