TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Nithila Devi
NA
1
6.4k
how to bind image dynamically inside listbox
Jun 10 2010 12:43 AM
My code is here:
<ListBox VerticalAlignment="Stretch" SelectionMode="Extended" Height="600" Width="313">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Height="25" Width="25">
<Image Source="{Binding img}" >
<Image.RenderTransform>
<ScaleTransform ScaleX="1" ScaleY="1" />
</Image.RenderTransform>
</Image>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
And I add code
List<Person> myl = new List<Person>();
myl.Add(new Person { img = "Images/s1.jpeg" });
myl.Add(new Person { img = "Images/s2.jpeg" });
listBox.ItemsSource = myl;
The image not binded.There is no error while running.
Reply
Answers (
1
)
Cluster Computing
Text between images in silverlight 3.0