1

ポップアウト画像の良い例を見つけました: http://tozon.info/blog/post/2007/10/14/three-ways-to-make-your-wpf-images-pop-out-on-mouseover .aspx

問題は、反対方向に成長させる必要があることです。例の画像は左から右に大きくなります。左側に伸ばしたい。

<!-- This storyboard will make the image grow to double its size in 0.2 seconds -->
<Storyboard x:Key="expandStoryboard">
  <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX"
                   To="2"
                   Duration="0:0:0.2" />
  <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY"
                   To="2"
                   Duration="0:0:0.2" />
</Storyboard>
<!-- This storyboard will make the image revert to its original size -->
<Storyboard x:Key="shrinkStoryboard">
  <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX"
                   To="1"
                   Duration="0:0:0.2" />
  <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY"
                   To="1"
                   Duration="0:0:0.2" />
</Storyboard>
4

1 に答える 1