我有一個列表框,此列表框包含圖像控件。如何更改wp7中的運行時列表框圖像路徑
我想要在列表框項目的單擊事件上運行時圖像路徑。
如何更改我的圖像控制路徑?
我的代碼是這樣的:
<ListBox x:Name="TransactionList" Width="450" Height="450" Margin="0,0,0,0">
<ListBox.ItemTemplate >
<DataTemplate>
<StackPanel Orientation="Horizontal" Width="450" Height="auto" Margin="0,0,10,0" >
<StackPanel Orientation="Horizontal" Width="300" Height="auto" Margin="0,0,1,10">
<TextBlock Height="35" Width="250" Margin="10,0,0,90" Text="{Binding SONGNAME}" FontSize="22" Foreground="Red" Name="tbSubCategories" />
<TextBlock Height="25" Margin="-250,10,180,30" Text="SingBy:" FontSize="18" Foreground="Gray" Name="tbsingby" />
<TextBlock Height="auto" TextWrapping="Wrap" Width="210" Margin="-180,50,0,70" Text="{Binding SINGBY}" FontSize="18" Foreground="Gray" Name="tbSingBy" />
<TextBlock Height="25" Margin="-280,60,200,0" Text="MusicBy:" FontSize="18" Foreground="Gray" Name="tbMusicby" />
<TextBlock Height="auto" TextWrapping="Wrap" Width="200" Margin="-205,100,0,30" Text="{Binding MUSICBY}" FontSize="18" Foreground="Gray" Name="tbMusicBy" />
</StackPanel>
<StackPanel Orientation="Vertical" Height="auto" Width="auto" Margin="0,50,0,35">
<Image Name="imgsubcatagorie" Width="40" Height="40" VerticalAlignment="Center" FlowDirection="LeftToRight" Source="/VodafoneAugmentedReality;component/Images/play1.png" />
</StackPanel>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
我想改變imgsubcatagories圖像控制路徑,當我在列表框中單擊項。 幫我
任何人都可以知道這個解決方案嗎? – MansinhDodiya