开发者

WPF ContextMenu: How can I tell who launched it?

开发者 https://www.devze.com 2023-03-01 04:23 出处:网络
I have a ContextMenu that can be opened from 2 different StackPanel\'s, how can I tell which panel actually launched the menu?

I have a ContextMenu that can be opened from 2 different StackPanel's, how can I tell which panel actually launched the menu?

Un开发者_运维百科der WinForms I could consult the SourceControl of the ContextMenuStrip to find this information.

TIA, Martin.


I think, what you're looking for is the PlacementTarget-property of the ContextMenu.

0

精彩评论

暂无评论...
验证码 换一张
取 消