title: Zooming Image in WPF
body: <p>I try make a zoom on image, I create style, here is :</p>
  
  
  
  <pre class="lang-xml prettyprint-override"><code>&lt;Style x:Key="ZoomImage" TargetType="{x:Type Image}"&gt;
      &lt;Style.Triggers&gt;
          &lt;Trigger Property="IsMouseOver" Value="True"&gt;
              &lt;Setter Property="LayoutTransform"&gt;
                  &lt;Setter.Value&gt;
                      &lt;ScaleTransform ScaleX="1.5" ScaleY="1.5"/&gt;
                  &lt;/Setter.Value&gt;
              &lt;/Setter&gt;
          &lt;/Trigger&gt;
      &lt;/Style.Triggers&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>and I apply this style in window:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;Grid Name="RootGrid" Margin="4,4,4,4"&gt;
      &lt;Grid.ColumnDefinitions&gt;
          &lt;ColumnDefinition Width="130"&gt;&lt;/ColumnDefinition&gt;
          &lt;ColumnDefinition Width="*"&gt;&lt;/ColumnDefinition&gt;
      &lt;/Grid.ColumnDefinitions&gt;
  
      &lt;Grid Name="InfoGrid" Grid.Column="0" Margin="4,4,4,4"&gt;
          &lt;Grid.RowDefinitions&gt;
              &lt;RowDefinition Height="150"&gt;&lt;/RowDefinition&gt;
              &lt;RowDefinition Height="*"&gt;&lt;/RowDefinition&gt;
              &lt;RowDefinition Height="150"&gt;&lt;/RowDefinition&gt;
          &lt;/Grid.RowDefinitions&gt;
  
          &lt;StackPanel Name="UserPanel" Grid.Row="0" Margin="4,4,4,4"&gt;
              &lt;Border BorderThickness="1"
                      BorderBrush="Black"
                      Margin="1,1,1,1"
                      Background="WhiteSmoke"&gt;
  
                  &lt;Image Name="UserImage"
                  &lt;!--Apply style --&gt;
                  Style="{StaticResource ZoomImage}"
                  Margin="4,4,4,4"&gt;
                  &lt;Image.Source&gt;
                      &lt;MultiBinding Converter="{StaticResource imageConvertor}"&gt;
                          &lt;Binding Path="ProfilePhoto"/&gt;
                          &lt;Binding Path="Status" UpdateSourceTrigger="PropertyChanged"/&gt;
                      &lt;/MultiBinding&gt;
                  &lt;/Image.Source&gt;
              &lt;/Image&gt;
  
          &lt;/Border&gt;
      &lt;/StackPanel&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>But is does not make o zoom, where can be problem?</p>
  
  <p>I use Guy advance:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;Trigger Property="IsHitTestVisible" Value="True"&gt;
      &lt;Setter Property="LayoutTransform"&gt;
          &lt;Setter.Value&gt;
              &lt;ScaleTransform ScaleX="1.5" ScaleY="1.5"/&gt;
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
  &lt;/Trigger&gt;
  </code></pre>
  
  <p>but, image is not zooming if mouse is over.</p>