Scroll text and images together question<p align=left>Hi,</p> <p align=left>i have a question regarding text and images that need to be scrolling together.</p> <p align=left>(like a ticker tape)</p> <p align=left> </p> <p align=left>In the past (windows forms) is created a usercontrol that made a bitmap that consists of text and images.</p> <p align=left>this bitmap was copied to the visible part of the usercontrol.</p> <p align=left> </p> <p align=left>My qs now is how to tackle this in wpf. Should i create a bitmap as in the previous version, or is the current system so better that the best way is to use elements that are moved...</p> <p align=left> </p> <p align=left>Regards,</p> <p align=left> </p> <p align=left>Willie Jan</p>© 2009 Microsoft Corporation. Todos os direitos reservados.Thu, 19 Jun 2008 00:15:52 Z658ead49-0c5b-4c93-8b36-c556f3ef15f1http://social.msdn.microsoft.com/Forums/pt-BR/wpf/thread/658ead49-0c5b-4c93-8b36-c556f3ef15f1#658ead49-0c5b-4c93-8b36-c556f3ef15f1http://social.msdn.microsoft.com/Forums/pt-BR/wpf/thread/658ead49-0c5b-4c93-8b36-c556f3ef15f1#658ead49-0c5b-4c93-8b36-c556f3ef15f1Willie007http://social.msdn.microsoft.com/Profile/pt-BR/?user=Willie007Scroll text and images together question<p align=left>Hi,</p> <p align=left>i have a question regarding text and images that need to be scrolling together.</p> <p align=left>(like a ticker tape)</p> <p align=left> </p> <p align=left>In the past (windows forms) is created a usercontrol that made a bitmap that consists of text and images.</p> <p align=left>this bitmap was copied to the visible part of the usercontrol.</p> <p align=left> </p> <p align=left>My qs now is how to tackle this in wpf. Should i create a bitmap as in the previous version, or is the current system so better that the best way is to use elements that are moved...</p> <p align=left> </p> <p align=left>Regards,</p> <p align=left> </p> <p align=left>Willie Jan</p>Fri, 24 Aug 2007 12:19:13 Z2007-09-07T07:22:15Zhttp://social.msdn.microsoft.com/Forums/pt-BR/wpf/thread/658ead49-0c5b-4c93-8b36-c556f3ef15f1#127ebced-830c-4b40-ac0a-bb70d5acf332http://social.msdn.microsoft.com/Forums/pt-BR/wpf/thread/658ead49-0c5b-4c93-8b36-c556f3ef15f1#127ebced-830c-4b40-ac0a-bb70d5acf332Yi-Lun Luohttp://social.msdn.microsoft.com/Profile/pt-BR/?user=Yi-Lun%20LuoScroll text and images together question<p class=MsoNormal style="margin:0cm 0cm 0pt"><span lang=EN-US><font face=Calibri size=3>Hello, is this what you want?</font></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt;text-align:left" align=left><span lang=EN-US style="font-size:9pt;color:#a31515;font-family:Consolas"><span style="">        </span></span><span lang=EN-US style="font-size:9pt;color:blue;font-family:Consolas">&lt;</span><span lang=EN-US style="font-size:9pt;color:#a31515;font-family:Consolas">ScrollViewer</span><span lang=EN-US style="font-size:9pt;color:blue;font-family:Consolas">&gt;</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt;text-align:left" align=left><span lang=EN-US style="font-size:9pt;color:#a31515;font-family:Consolas"><span style="">            </span></span><span lang=EN-US style="font-size:9pt;color:blue;font-family:Consolas">&lt;</span><span lang=EN-US style="font-size:9pt;color:#a31515;font-family:Consolas">StackPanel</span><span lang=EN-US style="font-size:9pt;color:blue;font-family:Consolas">&gt;</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt;text-align:left" align=left><span lang=EN-US style="font-size:9pt;color:#a31515;font-family:Consolas"><span style="">                </span></span><span lang=EN-US style="font-size:9pt;color:blue;font-family:Consolas">&lt;</span><span lang=EN-US style="font-size:9pt;color:#a31515;font-family:Consolas">TextBlock</span><span lang=EN-US style="font-size:9pt;color:blue;font-family:Consolas">&gt;</span><span lang=EN-US style="font-size:9pt;color:#a31515;font-family:Consolas">abc</span><span lang=EN-US style="font-size:9pt;color:blue;font-family:Consolas">&lt;/</span><span lang=EN-US style="font-size:9pt;color:#a31515;font-family:Consolas">TextBlock</span><span lang=EN-US style="font-size:9pt;color:blue;font-family:Consolas">&gt;</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt;text-align:left" align=left><span lang=EN-US style="font-size:9pt;color:#a31515;font-family:Consolas"><span style="">                </span></span><span lang=EN-US style="font-size:9pt;color:blue;font-family:Consolas">&lt;</span><span lang=EN-US style="font-size:9pt;color:#a31515;font-family:Consolas">Image</span><span lang=EN-US style="font-size:9pt;color:red;font-family:Consolas"> Source</span><span lang=EN-US style="font-size:9pt;color:blue;font-family:Consolas">=&quot;image.jpg&quot;/&gt;</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt;text-align:left" align=left><span lang=EN-US style="font-size:9pt;color:#a31515;font-family:Consolas"><span style="">            </span></span><span lang=EN-US style="font-size:9pt;color:blue;font-family:Consolas">&lt;/</span><span lang=EN-US style="font-size:9pt;color:#a31515;font-family:Consolas">StackPanel</span><span lang=EN-US style="font-size:9pt;color:blue;font-family:Consolas">&gt;</span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt;text-align:left" align=left><span lang=EN-US style="font-size:9pt;color:#a31515;font-family:Consolas"><span style="">        </span></span><span lang=EN-US style="font-size:9pt;color:blue;font-family:Consolas">&lt;/</span><span lang=EN-US style="font-size:9pt;color:#a31515;font-family:Consolas">ScrollViewer</span><span lang=EN-US style="font-size:9pt;color:blue;font-family:Consolas">&gt;</span></p> <p align=left><font face=Arial size=2></font> </p>Mon, 27 Aug 2007 08:24:46 Z2007-08-27T08:24:46Zhttp://social.msdn.microsoft.com/Forums/pt-BR/wpf/thread/658ead49-0c5b-4c93-8b36-c556f3ef15f1#3e7a6593-c262-4c6b-8f0c-6a1a1badbb91http://social.msdn.microsoft.com/Forums/pt-BR/wpf/thread/658ead49-0c5b-4c93-8b36-c556f3ef15f1#3e7a6593-c262-4c6b-8f0c-6a1a1badbb91Willie007http://social.msdn.microsoft.com/Profile/pt-BR/?user=Willie007Scroll text and images together question<p align=left><font face=Arial size=2></font> </p> <p>Hi,</p> <p align=left> </p> <p align=left>what I tried is using a Grid,</p> <p align=left> </p> <p align=left>But when the control is hosted into for example a Border Control, it will resize automatically to the measurements of the border size, and it must retain the full size...</p> <p align=left>besides that I have to wait for the layout engine to have calculated the pixels before i can add a animation.</p> <p> </p> <p align=left>is the scrollviewer able to get the same speed as using a grid to create a ticker tape?</p> <p align=left>The speed of a grid running is ok.</p> <p align=left> </p> <p align=left>i will have a look at the scrollviewer.</p> <p align=left> </p> <p align=left>Thanks for your help.</p>Wed, 29 Aug 2007 08:14:07 Z2007-08-29T08:14:07Zhttp://social.msdn.microsoft.com/Forums/pt-BR/wpf/thread/658ead49-0c5b-4c93-8b36-c556f3ef15f1#db327398-979f-4131-8ea6-e985acb4f72fhttp://social.msdn.microsoft.com/Forums/pt-BR/wpf/thread/658ead49-0c5b-4c93-8b36-c556f3ef15f1#db327398-979f-4131-8ea6-e985acb4f72fYi-Lun Luohttp://social.msdn.microsoft.com/Profile/pt-BR/?user=Yi-Lun%20LuoScroll text and images together question<p><font face="Times New Roman">Border or Grid won't make your content scroll. If you need scrolling, you'll need a ScrollViewer. You can put your Border insider the ScrollViewer:</font></p> <p align=left><font face="Times New Roman">&lt;ScrollViewer&gt;</font></p> <blockquote dir=ltr style="margin-right:0px"> <p align=left><font face="Times New Roman">&lt;Border&gt;</font></p> <p align=left><font face="Times New Roman">...</font></p> <p align=left><font face="Times New Roman">&lt;/Border&gt;</font></p></blockquote> <p dir=ltr align=left><font face="Times New Roman">&lt;/ScrollViewer&gt;</font></p> <p align=left><font face=Arial size=2></font> </p>Wed, 29 Aug 2007 08:30:47 Z2007-08-29T08:30:47Zhttp://social.msdn.microsoft.com/Forums/pt-BR/wpf/thread/658ead49-0c5b-4c93-8b36-c556f3ef15f1#df7a6364-5b96-4953-9f19-d321e3b55869http://social.msdn.microsoft.com/Forums/pt-BR/wpf/thread/658ead49-0c5b-4c93-8b36-c556f3ef15f1#df7a6364-5b96-4953-9f19-d321e3b55869Willie007http://social.msdn.microsoft.com/Profile/pt-BR/?user=Willie007Scroll text and images together questionI create a animation which scrolls the grid through the border control. with clipping turned on, it looks like a ticker tape ... <p align=left> </p>Wed, 29 Aug 2007 09:32:01 Z2007-08-29T09:32:01Zhttp://social.msdn.microsoft.com/Forums/pt-BR/wpf/thread/658ead49-0c5b-4c93-8b36-c556f3ef15f1#8c219778-d119-4f10-9a43-8d650235c12ehttp://social.msdn.microsoft.com/Forums/pt-BR/wpf/thread/658ead49-0c5b-4c93-8b36-c556f3ef15f1#8c219778-d119-4f10-9a43-8d650235c12eSteve Galic - MSFThttp://social.msdn.microsoft.com/Profile/pt-BR/?user=Steve%20Galic%20-%20MSFTScroll text and images together question<p align=left><font face=Arial size=2></font>  <p align=left><font face=Arial size=2>Are you looking for something like this:</font> <p align=left><font face=Arial size=2>  <div class=codeseg> <div class=codecontent> <div class=codesniptitle><span style="width:100%">Code Snippet</span></div> <p align=left><font face=Arial size=2>&lt;Canvas xmlns=&quot;<a title="http://schemas.microsoft.com/winfx/2006/xaml/presentation" href="http://schemas.microsoft.com/winfx/2006/xaml/presentation">http://schemas.microsoft.com/winfx/2006/xaml/presentation</a>&quot;<br>xmlns:x=&quot;<a title="http://schemas.microsoft.com/winfx/2006/xaml" href="http://schemas.microsoft.com/winfx/2006/xaml">http://schemas.microsoft.com/winfx/2006/xaml</a>&quot;&gt;</font></p> <p align=left><font face=Arial size=2>&lt;Border BorderBrush=&quot;Red&quot; BorderThickness=&quot;2,2,2,2&quot; CornerRadius=&quot;15,0,15,15&quot; Canvas.Top=&quot;50&quot; Canvas.Left=&quot;50&quot; ClipToBounds=&quot;True&quot; Width=&quot;300&quot; Height=&quot;75&quot;&gt;</font></p> <p align=left><font face=Arial size=2> &lt;Canvas Canvas.Top=&quot;60&quot; Canvas.Left=&quot;60&quot; Height=&quot;60&quot;&gt;<br> &lt;Canvas.RenderTransform&gt;<br>   &lt;TranslateTransform X=&quot;300&quot;/&gt;<br> &lt;/Canvas.RenderTransform&gt;<br> &lt;Canvas.Triggers&gt;<br>   &lt;EventTrigger RoutedEvent=&quot;FrameworkElement.Loaded&quot;&gt;<br>    &lt;BeginStoryboard&gt;<br>     &lt;Storyboard&gt;<br>      &lt;DoubleAnimation Storyboard.TargetProperty=&quot;(Canvas.RenderTransform).(TranslateTransform.X)&quot;  To=&quot;-700&quot; RepeatBehavior=&quot;Forever&quot; Duration=&quot;0:0:8&quot; /&gt;<br>     &lt;/Storyboard&gt;<br>    &lt;/BeginStoryboard&gt;<br>   &lt;/EventTrigger&gt;<br> &lt;/Canvas.Triggers&gt;</font></p> <p align=left><font face=Arial size=2>   &lt;TextBlock&gt;This is my looooooooooooooooooooooooooooooooooooooong scrolling text. It goes on and on and on&lt;/TextBlock&gt;<br>   &lt;Image Canvas.Left=&quot;570&quot; Source=&quot;c:\image.jpg&quot;/&gt;<br> &lt;/Canvas&gt;</font></p> <p align=left><font face=Arial size=2>&lt;/Border&gt;</font></p> <p align=left><font face=Arial size=2>&lt;/Canvas&gt;</font></p> <p align=left> </p></div></div> <p align=left> </p></font> <p></p> <p align=left><font face=Arial size=2></font> </p>Thu, 06 Sep 2007 00:24:41 Z2007-09-07T07:22:15Zhttp://social.msdn.microsoft.com/Forums/pt-BR/wpf/thread/658ead49-0c5b-4c93-8b36-c556f3ef15f1#79bd5313-635b-46cf-84f0-bc51cc9254a5http://social.msdn.microsoft.com/Forums/pt-BR/wpf/thread/658ead49-0c5b-4c93-8b36-c556f3ef15f1#79bd5313-635b-46cf-84f0-bc51cc9254a5Willie007http://social.msdn.microsoft.com/Profile/pt-BR/?user=Willie007Scroll text and images together question<p>I think steve, that's the way to go...</p> <p align=left>I have to do some performance tests to see how it works out.</p> <p align=left>Maybe i'm still a little affraid of all performance problems under VS 2005 with elements and moving them around<img src="http://forums.microsoft.com/MSDN/WebResource.axd?d=NySzF1eivP_rMoc50GQJzcvS4MHMOEKwYrCIgDtzuzlw7GsNki3H_INlfYaLgkxFjZzlJqkjpAu4Xq-FyiiVVaQaw-vp9CJ___CKdW9Lf2I1&amp;t=633229584498879646"></p> <p align=left><font face=Arial size=2>looks like the direct-x under the new framework is doing some good job here...</font></p> <p align=left> </p> <p align=left>thanks.</p>Fri, 07 Sep 2007 07:22:03 Z2007-09-07T07:22:03Zhttp://social.msdn.microsoft.com/Forums/pt-BR/wpf/thread/658ead49-0c5b-4c93-8b36-c556f3ef15f1#3a665593-3ed0-495b-9b31-08ee7c2b13d7http://social.msdn.microsoft.com/Forums/pt-BR/wpf/thread/658ead49-0c5b-4c93-8b36-c556f3ef15f1#3a665593-3ed0-495b-9b31-08ee7c2b13d7Steve Galic - MSFThttp://social.msdn.microsoft.com/Profile/pt-BR/?user=Steve%20Galic%20-%20MSFTScroll text and images together question<p align=left><font face=Arial size=2>Since the sample above is using RenderTransform you don't have to worry about triggering a layout pass every time you move the elements, so performance should be pretty good</font></p>Mon, 10 Sep 2007 20:12:19 Z2007-09-10T20:12:19Z