Note that there are some explanatory texts on larger screens.

plurals
  1. POdata binding image link using deserialized json data in c# windows phone
    primarykey
    data
    text
    <p>i had some json data so i deserialized it and bind the data to the listbox to show the data in text blocks....now the problem is i am trying to add an image in the same list box and want to bind the image source using the data of deserialized object</p> <p>i mean the link for the image contains some text which is present in the deserialized data which will change with the change in data....</p> <p><strong>can anyone tell me how can i use the data of the deserialized object and then make a new string to pass the image source to bind it to the image present in listbox??</strong></p> <p>thanks in advance...</p> <p>update:</p> <p><strong>here is the listbox part of xaml</strong></p> <pre><code>&lt;ListBox x:Name="listdata" ScrollViewer.VerticalScrollBarVisibility="Visible" ItemsSource="{Binding data}" Height="0" Margin="0,72,0,0"&gt; &lt;ListBox.ItemTemplate&gt; &lt;DataTemplate&gt; &lt;Grid&gt; &lt;Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0" DataContext="{Binding}"&gt; &lt;Image Grid.Row="1" Height="50" HorizontalAlignment="Left" Name="image1" Stretch="None" VerticalAlignment="Top" Width="50" Source="{Binding PicLink}" /&gt; &lt;TextBlock Height="50" HorizontalAlignment="Left" Margin="12,6,0,0" Name="textBlock1" Text="{Binding name}" VerticalAlignment="Top" Width="Auto" TextAlignment="Center" TextWrapping="Wrap" /&gt; &lt;TextBlock Height="Auto" HorizontalAlignment="Left" Margin="6,42,0,0" Name="textBlock3" Text="{Binding timedata}" VerticalAlignment="Top" Width="Auto" MinHeight="0" TextWrapping="Wrap" /&gt; &lt;/Grid&gt; &lt;/Grid&gt; &lt;/DataTemplate&gt; &lt;/ListBox.ItemTemplate&gt; &lt;/ListBox&gt; </code></pre> <p><strong>here is the part of c# code:</strong></p> <pre><code>public class Datum { public string timedata { get; set; } string part = string.Empty; public string parts { get { return part; } set { part = value; } } public string name { get; set; } public string PicLink { get { return string.Format("google.com/{0}/image",part); } } } </code></pre> <p>everything is working fine except the image.....image part also works when i replace the PicLink to return a static url instead of variable one</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload