첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170

■ BitmapImage 엘리먼트의 DecodePixelWidth/DecodePixelHeight 속성을 사용하는 방법을 보여준다.

 

▶ 예제 코드 (XAML)

<Image Width="200">
    <Image.Source>
        <BitmapImage
            DecodePixelWidth="200"
            UriSource="C:\pinkcherries.jpg" />
    </Image.Source>
</Image>

※ DecodePixelWidth 특성만 설정하면 DecodePixelHeight는 이미지 원본 크기에 비례해서 설정된다.
※ DecodePixelWidth/DecodePixelHeight 특성을 설정하면 이미지 원본을 샘플링한 이미지가 된다.

728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요