//</Snippet2> //<Snippet3> void projectItemType_ProjectItemMenuItemsRequested(object sender, SharePointProjectItemMenuItemsRequestedEventArgs e) { IMenuItem menuItem = e.ViewMenuItems.Add("Write Message to Output Window"); menuItem.Click += MenuItemExtension_Click; }
/// <summary> /// Handles the ProjectItemMenuItemsRequested event of the spit control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="Microsoft.VisualStudio.SharePoint.SharePointProjectItemMenuItemsRequestedEventArgs"/> instance containing the event data.</param> void spit_ProjectItemMenuItemsRequested(object sender, SharePointProjectItemMenuItemsRequestedEventArgs e) { IMenuItem findAllReferencesMenuItem = e.ViewMenuItems.Add("Find all references"); findAllReferencesMenuItem.Click += new EventHandler <MenuItemEventArgs>(findAllReferencesMenuItem_Click); IMenuItem removeFromAllReferencesMenuItem = e.ViewMenuItems.Add("Remove from all Features and Packages..."); removeFromAllReferencesMenuItem.Click += new EventHandler <MenuItemEventArgs>(removeFromAllReferencesMenuItem_Click); if (CanBeDeployedUsingFeature(e.ProjectItem.ProjectItemType.SupportedDeploymentScopes)) { IMenuItem addToSpecificFeature = e.AddMenuItems.Add("Add to specific Feature..."); addToSpecificFeature.Click += new EventHandler <MenuItemEventArgs>(addToSpecificFeature_Click); } if (SupportsDeploymentScope(e.ProjectItem.ProjectItemType.SupportedDeploymentScopes, SupportedDeploymentScopes.Package)) { IMenuItem addToSpecificPackage = e.AddMenuItems.Add("Add to specific Package..."); addToSpecificPackage.Click += new EventHandler <MenuItemEventArgs>(addToSpecificPackage_Click); } }
private void ProjectItemMenuItemsRequested( object sender, SharePointProjectItemMenuItemsRequestedEventArgs e) { e.ViewMenuItems.Add(designerMenuItemText).Click += MenuItemClick; }
void ContextMenuRequested(object sender, SharePointProjectItemMenuItemsRequestedEventArgs e) { var mi = e.ViewMenuItems.Add("Hello SharePoint Extensibility!"); mi.Click += ContextMenuClicked; }
private void ProjectItemMenuItemsRequested(object sender, SharePointProjectItemMenuItemsRequestedEventArgs e) { e.ViewMenuItems.Add("Generate External Data List").Click += GenerateExternalDataLists_Execute; }
private void ProjectItemMenuItemsRequested( object sender, SharePointProjectItemMenuItemsRequestedEventArgs e) { e.ViewMenuItems.Add(designerMenuItemText).Click += MenuItemClick; }