ScaleTransform in LayoutTransform not working but works with RenderTransform

前端 未结 1 1685
不思量自难忘°
不思量自难忘° 2021-01-13 05:17

I am trying to do two things in my application.

1. Zoom Image

Able to do with RenderTransform. but need to achieve in LayoutTransform

1条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-13 05:36

    Try adding Stretch="None" to your Image tag, or failing that supply an explicit height and width.

    In certain panels WPF will automatically stretch the image to the available space in the panel, which will make your scale transform redundant when it's part of the layout process.

    0 讨论(0)
提交回复
热议问题