【发布时间】:2017-01-05 23:12:50
【问题描述】:
大家好,我正在开发一个 xamarin 应用程序,但遇到了问题。 我在 xaml 中有下一个代码:
<ListView x:Name="listName">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Orientation="Vertical">
<Image Source="{Binding imageName}"></Image>
<Label Text="{Binding name}" TextColor="Black"></Label>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
我需要更改图像源属性添加一个字符串。例如:
<Image Source="{Binding imageName} + mystring.png"></Image>
<Image Source="{Binding imageName + mystring.png}"></Image>
我可以在 xaml 中执行此操作吗? 任何想法?有可能吗?
【问题讨论】:
标签: image xaml xamarin binding imagesource