Search
DiagramView.ItemVirtualized Event
See Also
 





Occurs when a diagram item is virtualized and its visual representation is destroyed.

Namespace: MindFusion.Diagramming.Wpf
Assembly: MindFusion.Diagramming.Wpf

 Syntax

C#  Copy Code

public event EventHandler<ItemPresenterEventArgs> ItemVirtualized

Visual Basic  Copy Code

Public Event ItemVirtualized As EventHandler(Of ItemPresenterEventArgs)

 Event Data

Member name

Description

Item

Gets the diagram item that is being realized or virtualized.

ItemContainer

Gets the UI element that represents a diagram item.

ItemVisual

Gets the root visual of the item's graphics representation. It is the result of DiagramItem.CreateRenderer, e.g. an instantiation of a data template.

 Remarks

You can handle the ItemVirtualized event to perform cleanup when an item's visual element is being removed from the visual tree. This is typically used to detach any event handlers or release resources that were attached during ItemRealized. Failing to do so may result in memory leaks.

 See Also