Circular effect in ticker-silverlight -
i working on silverlight ticker application, 5 links visible , moving ticker(right left). able parse i/p xml file , getting title , corresponding urls, coming in page, moving ticker , circular effect missing.means continuous flow of links not proper.
  <grid x:name="layoutroot">     <stackpanel x:name="mystackpanel" grid.column="1" orientation="vertical">         <canvas>             <canvas.resources>                 <storyboard x:name="sb">                     <doubleanimation x:name="da" begintime="00:00:05"                 storyboard.targetname="linklist"                 storyboard.targetproperty="(canvas.left)"                 from="0" to="-500" duration="0:0:5" repeatbehavior="forever"/>                  </storyboard>             </canvas.resources>             <listbox x:name="linklist"                       borderthickness="0"                       opacity="0.5"                       horizontalalignment="left"                      >             <listbox.itemspanel>                 <itemspaneltemplate>                     <stackpanel x:name="panel" orientation="horizontal"  horizontalalignment="left"/>                 </itemspaneltemplate>             </listbox.itemspanel>             <listbox.itemtemplate>                 <datatemplate>                     <hyperlinkbutton x:name="mylink"                                          foreground="black"                                          fontsize="10"                                          fontweight="bold"                                          scrollviewer.horizontalscrollbarvisibility="disabled"                                          tag="{binding}"                                          content="{binding path=title}"                                          navigateuri="{binding path=uri}"                                          istabstop="false"/>                 </datatemplate>             </listbox.itemtemplate>         </listbox>  </canvas>  </stackpanel>      </grid>   how circular effect?
here the simplest approach effect need.
- set 
fromin double animation width of outerstackpanel. way urls start extreme right. - make sure 
tovalue negative of @ least full width of content scrolled. - add 
rectanglegeometryouter stackpanel starts @ 0,0 , has width , height of stackpanel. - adjust 
durationreasonable pixels/second rate (you want constant speed not appearing increase in speed more content present). 
Comments
Post a Comment