image zoom in out

감싸는 Grid에 ClipToBounds 속성 값을 True로 주면 아마 원하는 결과이지 않을까 합니다.

| ClipToBounds = “False”
image

| ClipToBounds = “True”
image

        <Grid
            Width="200"
            Height="200"
            Background="Red"
            ClipToBounds="True">
            <Image Source="https://www.hdec.kr/FileContents/EditorImg/20211227/%EA%B0%95%EC%9B%90%20%EC%A0%95%EC%84%A0%20%EB%A7%8C%ED%95%AD%EC%9E%AC_770.jpg">
                <Image.RenderTransform>
                    <ScaleTransform ScaleX="2" ScaleY="2" />
                </Image.RenderTransform>
            </Image>
        </Grid>
1개의 좋아요