PackagePart.ContentType 속성

정의

콘텐츠 스트림의 MIME 형식을 가져옵니다.

public:
 property System::String ^ ContentType { System::String ^ get(); };
public string ContentType { get; }
member this.ContentType : string
Public ReadOnly Property ContentType As String

속성 값

파트에 대한 콘텐츠 데이터 스트림의 MIME 형식입니다.

예외

파트가 삭제된 경우

또는

Package가 열려 있지 않은 경우(Dispose(Boolean) 또는 Close()가 호출된 경우)

또는

파생 클래스의 GetContentTypeCore() 메서드에서 반환한 문자열이 비어 있는 경우

설명

ContentType 는 부모가 Package 열려 있는 경우에만 액세스할 수 있는 읽기 전용 속성입니다.

속성은 ContentType 생성자에 의해 PackagePart 자동으로 설정됩니다. 생성자에 의해 설정되면 을 ContentType 변경할 수 없습니다.

속성은 ContentTypeRFC 2616하이퍼텍스트 전송 프로토콜 - HTTP, 섹션 3.7에 따라 형성된 MIME 형식입니다. 다음 표에서는 XPS(XML Paper Specification) 문서에 사용되는 콘텐츠 MIME 형식의 예를 보여 줍니다.

Description 콘텐츠 유형
글꼴 application/vnd.ms-opentype
ICC 프로필 application/vnd.ms-color.iccprofile
JPEG 이미지 image/jpeg
난독 처리를 한 글꼴 application/vnd.ms-package.obfuscated-opentype
PNG 이미지 image/png
Printticket application/vnd.ms-printing.printticket+xml
TIFF 이미지 image/tiff
Windows Media 사진 이미지 image/vnd.ms-photo

적용 대상

추가 정보