WPF 新增winform控制元件,不支援右鍵選單的解決方法
阿新 • • 發佈:2019-01-25
Datagridview.ContextMenuStrip = contextMenuStripDatagrid;
contextMenuStripDatagrid.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
toolStripMenuItem_delete,toolStripMenuItem_modify});
contextMenuStripDatagrid.Name = "contextMenuStripDatagrid";
contextMenuStripDatagrid.Size = new System.Drawing.Size(15, 28);
toolStripMenuItem_delete.Name = "toolStripMenuItemDelete";
toolStripMenuItem_delete.Size = new System.Drawing.Size(14, 24);
toolStripMenuItem_delete.Text = "delete";
toolStripMenuItem_modify.Name = "toolStripMenuItemDelete";
toolStripMenuItem_delete.Size = new System.Drawing.Size(14, 24);
toolStripMenuItem_delete.Text = "delete";