Raj
Raj

Reputation: 1770

WPF grand parent of context menu option

I am dynamically creating a ContextMenu which contains a ComboxBox as one of the items and it is used by two separate Canvas. The combobox comtains percentage values so the idea is to rightclick on one of the canvas, select the percentage and set the RenderTransform. However, I'm unable to determine on whcih canvas the contextmenu was opened. Any clues?

Upvotes: 3

Views: 352

Answers (1)

Navid Rahmani
Navid Rahmani

Reputation: 7958

use ContextMenu's PlacementTarget Property

Upvotes: 2

Related Questions