Skip to content

ContextMenu.PlacementTarget property

Gets the element the menu last opened on. Set by Show and kept until the next show, so a handler that runs after the menu closed can still read it.

public UIElement? PlacementTarget { get; }