在我的应用程序中,我想在单击时调整缩略图图像的大小,所有图像都在 ItemTemplate 中,其 Source 属性绑定到图片的 url。
我尝试这样的事情(这是在我的 DataTemplate 文件中)
<TextBlock>
<Hyperlink TextDecorations="None"
Command="helpers:StatusesCommands.ShowPicture"
CommandParameter="{Binding}">
<Image Source="{Binding Path=FirstPictureUrl}" Margin="5" />
</Hyperlink>
</TextBlock>
但是在命令处理程序中,我不知道如何获取此图像。ExecutedRoutedEventArgs 上的 OriginalSource 属性设置为 HyperLink,Source 设置为我的控件。
也许可以将 CommangParameter 设置为我的嵌套图像,但我不知道该怎么做。你知道如何解决这个问题吗?