VSTO görünümde, bir klasöre sağ tıklarken görünecek bir düğme koymaya çalışıyorum. Benim Başlangıç fonksiyonu, bu var:C# (görünüm eklentisi) klasörlerdeki bağlam menüsü
Outlook.Application myApp = new Outlook.ApplicationClass();
myApp.FolderContextMenuDisplay += new ApplicationEvents_11_FolderContextMenuDisplayEventHandler(myApp_FolderContextMenuDisplay);
sonra
i bunun için işleyicisi var ...
void myApp_FolderContextMenuDisplay(CommandBar commandBar, MAPIFolder Folder)
{
var contextButton = commandBar.Controls.Add(MsoControlType.msoControlButton, missing, missing, missing, true) as CommandBarButton;
contextButton.Visible = true;
contextButton.Caption = "some caption...";
contextButton.Click += new _CommandBarButtonEvents_ClickEventHandler(contextButton_Click);
}
ve nihayet tıklama için işleyici ....
void contextButton_Click(CommandBarButton Ctrl, ref bool CancelDefault)
{
//stuff here
}
Benim soru MAPIFolder Folder
'u myApp_FolderContextMenuDisplay
'dan contextButton_Click
'a nasıl gönderirim?