c# - Wrappanel in ItemsControl.ItemsPanel throws XamlParseException -


in wp8 app show content (images example). use longlistselector, , in each lls's item have itemscontrol collection of images. want show 2 images in 1 line, use wrappanel. throws xamlparseexception in line initializecomponent() in usercontrol's page. without wrappanel works fine. here code

            <itemscontrol horizontalalignment="center" itemssource="{binding vkontakte.attachments.photos}" >             <itemscontrol.itemspanel>                 <itemspaneltemplate>                     <toolkit:wrappanel height="100" width="100" />                 </itemspaneltemplate>             </itemscontrol.itemspanel>              <itemscontrol.itemtemplate>                 <datatemplate>                 <image margin="0,10,0,0" >                     <image.source>                         <bitmapimage urisource="{binding src}" createoptions="backgroundcreation" />                     </image.source>                 </image>             </datatemplate>             </itemscontrol.itemtemplate>         </itemscontrol> 

maybe problem in case, itemscontrol in stackpanel?

the exception thrown due itemssource binding. if vkontakte not object on datacontext may need take @ binding to. needs collection of kind of object.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -