Ejemplo n.º 1
0
        public override bool IsValidStartupItem(IProjectItem projectItem)
        {
            if (this.IsControlLibrary)
            {
                return(base.IsValidStartupItem(projectItem));
            }
            ProjectXamlContext projectContext = ProjectXamlContext.GetProjectContext((IProject)this);

            if (projectItem != null && projectContext != null)
            {
                IProjectDocument document = projectContext.GetDocument(DocumentReferenceLocator.GetDocumentLocator(projectItem.DocumentReference));
                if (document != null && document.DocumentType == ProjectDocumentType.Page)
                {
                    return(true);
                }
            }
            return(false);
        }