ProjectItem.IsOpen 속성

특정 뷰 형식에서 프로젝트 항목이 열려 있는지 여부를 나타내는 값을 가져옵니다.

네임스페이스:  EnvDTE
어셈블리:  EnvDTE(EnvDTE.dll)

구문

‘선언
ReadOnly Property IsOpen ( _
    ViewKind As String _
) As Boolean
    Get
bool this[
    string ViewKind
] { get; }
property bool IsOpen[[InAttribute] String^ ViewKind] {
    bool get ([InAttribute] String^ ViewKind);
}
abstract IsOpen : bool
JScript에서는 인덱싱된 속성을 지원하지 않습니다.

매개 변수

  • ViewKind
    형식: System.String
    필수적 요소로서,확인할 뷰의 형식을 나타내는 Constants.vsViewKind*입니다.

속성 값

형식: System.Boolean
프로젝트가 지정된 뷰 형식에 열려 있으면 true를 나타내고 그렇지 않으면 false를 나타내는 부울 값입니다.

예제

Sub IsOpenExample()
   Dim proj As Project
   Dim projitems As ProjectItems
   Dim msg As String

   ' Reference the current solution and its projects and project items.
   proj = DTE.ActiveSolutionProjects(0)
   projitems = proj.ProjectItems

   ' List properties of the project and its items.
   msg = "Is the item open? " & projitems.Item(1).IsOpen & Chr(13)
   msg = msg & "The project's unique name: " & proj.UniqueName
   ' The following two properties work only if the current project 
   ' contains subprojects. If it does, then uncomment the lines to run 
   ' them.
   ' msg = msg & "The parent project item name: " & proj.ParentProjectItem.Name & Chr(13)
   ' msg = msg & "The subproject name: " & projitems.Item(1).SubProject.Name & Chr(13)
   MsgBox(msg)
End Sub

.NET Framework 보안

  • 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.

참고 항목

참조

ProjectItem 인터페이스

EnvDTE 네임스페이스

기타 리소스

프로젝트 및 솔루션 제어