Skip to content

Instantly share code, notes, and snippets.

@adalon
Created May 21, 2014 13:47
Show Gist options
  • Save adalon/b5bbb7a84b14b9b88099 to your computer and use it in GitHub Desktop.
Save adalon/b5bbb7a84b14b9b88099 to your computer and use it in GitHub Desktop.
int AddNew()
{
IVsAddProjectItemDlg addItemDialog;
string strFilter = String.Empty;
string location = string.Empty;
int iDontShowAgain;
IVsProject3 project = this.parent.Project.ToDteProject().ToVsProject();
addItemDialog = this.Parent.Project.GetService<IVsAddProjectItemDlg>();
uint uiFlags = (uint)(__VSADDITEMFLAGS.VSADDITEM_AddNewItems | __VSADDITEMFLAGS.VSADDITEM_SuggestTemplateName | __VSADDITEMFLAGS.VSADDITEM_AllowHiddenTreeView);
Guid projectGuid = GuidList.guidMonoTouchProjectTypeGuid;
addItemDialog.AddProjectItemDlg(
VSConstants.VSITEMID_ROOT,
ref projectGuid,
project,
uiFlags,
"Code",
"Asset Catalog",
ref location,
ref strFilter,
out iDontShowAgain);
return VSConstants.S_OK;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment