I have an array of Image URLS .I want to dynamically add Pivot item for each image Url, and add an image box to each pivot item to display the image .How can i proceed ? Please help.
Thanks and Regards
vaysage
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is not the recommended approach. Use data-binding instead.
make
arrayFeedof typeObservableCollection<Uri>, assign it toItemsSourceofmainPivotand useItemTemplateto customize your item UI.Example:
Code:
XAML:
–EDIT–
For your comment,
Generally, it is a good idea to use
ObservableCollectionwhile data-binding inSilverlight/WPF.ObservableCollectionimplementsINotifyCollectionChangedinterface. It is helpful for notifyingUIelements whenever items are added to/removed fromObservableCollection. That wayUIcan update itself.