XAML: Code:// 写在 Window_Loaded 事件中看效果cmd.Click += (obj, args) => { menu.IsOpen = true; };
Use Icommand, then btn command binding --> Icommand {}, get{...relaycommand(p->show())}... show(){ popup ContextMenu block }