c# - Creating Scrolling Items in Silverlight -


i have silverlight application needs scroll data (like stock information) across footer of application. in effort this, created following:

<usercontrol.resources>     <storyboard x:name="myliststoryboard" begintime="0:0:0"  completed="myliststoryboard_completed">         <doubleanimation x:name="mylistanimation" duration="0:0:30" storyboard.targetproperty="(uielement.rendertransform).(compositetransform.translatex)" storyboard.targetname="myitemscontrol" />     </storyboard> </usercontrol.resources>   <border x:name="infolistborder" grid.row="1" height="40" horizontalalignment="stretch" borderthickness="1,1,0,0" background="silver">   <grid>     <itemscontrol x:name="myitemscontrol" horizontalalignment="right" scrollviewer.horizontalscrollbarvisibility="disabled" scrollviewer.verticalscrollbarvisibility="disabled">       <itemscontrol.itemspanel>         <itemspaneltemplate>           <stackpanel orientation="horizontal"></stackpanel>         </itemspaneltemplate>                               </itemscontrol.itemspanel>       <itemscontrol.rendertransform>         <compositetransform/>       </itemscontrol.rendertransform>     </itemscontrol>   </grid> </border> 

i binding list of string elements myitemscontrol in code behind. these elements objects later , want use datatemplate in itemscontrol. now, i'm trying text display. problem is, not of items appear correctly. looks if 1 @ end gets cut off. suspect because of uivirtualization in items control, i'm not sure how fix this.

what doing wrong? how of items appear?

thnk you!

try following

<border x:name="infolistborder" grid.row="1" height="40" horizontalalignment="stretch"                       borderthickness="1,1,0,0" background="silver">   <grid>     <scrollviewer>       <itemscontrol x:name="myitemscontrol" horizontalalignment="right" >           <itemscontrol.itemspanel>             <itemspaneltemplate>               <stackpanel orientation="horizontal"></stackpanel>             </itemspaneltemplate>                                   </itemscontrol.itemspanel>           <itemscontrol.rendertransform>             <compositetransform/>           </itemscontrol.rendertransform>         </itemscontrol>     </scrollviewer>   </grid> </border> 

itemscontrol not have in default template scrollviewer(datagrid,combobox,listbox). can edit style , put scrollviwer style (itemsprensenter inside scrollviwer)


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -