How can i chose different data templates for different items in listbox?
I know the question I am asking is normally not encourentered in business applications. However i have encourentered such a need today.
The photos in my listbox are coming from two sources :- One is offcourse from database and other is coming from facebook. I have the user's photo link using facebook C# SDK. Thus i need to have two different data templates as well as binding set up that way. How can i solve this problem? Oh! and yeah i don't want to put up two listboxes on screen and do patch work by putting one listbox exclusively for images coming from my server开发者_运维百科 and other which are coming from facebook.
Thanks in advance :)
Was looking for the same thing since i heard that DataTemplateSelector was missing in Silverlight.
Came across this article that might help anyone else that is looking. SLTemplateSelector
精彩评论