<Grid>
<Image x:Name="imgSource" Source="{Binding WebPath}" HorizontalAlignment="Center" VerticalAlignment="Center" Width="40" Height="40">
<!--Tag="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext}" -->
<!--<Image.RenderTransform>
<ScaleTransform x:Name="scaleTrans" CenterX="20" CenterY="20"/>
</Image.RenderTransform>-->
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseEnter">
<i:InvokeCommandAction Command="{Binding MouseEnterFeedFileCommand}" CommandParameter="{Binding}"/>
</i:EventTrigger>
<i:EventTrigger EventName="MouseLeave">
<i:InvokeCommandAction Command="{Binding MouseLeaveFeedFileCommand}" CommandParameter="{Binding}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</Image>
</Grid>
private void MouseEnterFeedFile(object obj) { if (MouseEnterFeedFileEvent != null) { MouseEnterFeedFileEvent(this); }
//ScaleTransform scaleTrans = new ScaleTransform { CenterX = 20, CenterY = 20 }; //Image img = obj as Image; //if (img != null) //{ // Panel.SetZIndex(img, 9); // img.RenderTransform = scaleTrans; // scaleTrans.ScaleX += 5; // scaleTrans.ScaleY += 5; //} }
private void MouseLeaveFeedFile(object obj)
{
if (MouseLeaveFeedFileEvent != null)
{
MouseLeaveFeedFileEvent(this);
}
//Image img = obj as Image;
//if (img != null)
//{
// Panel.SetZIndex(img, 0);
// ScaleTransform scaleTrans = img.RenderTransform as ScaleTransform;
// if (scaleTrans != null)
// {
// scaleTrans.ScaleX -= 5;
// scaleTrans.ScaleY -= 5;
// }
//}
}