0

I need to delay rendering some string with some beautiful font I'll chose. Some way of rendering speed regulation through the code will also be very good feature. Can you suggest some idea and/or library(-ies) that helps? Thanks in advance. P. S. I use VS 2010 Ultimate, if it's important.

Max
  • 105
  • 4
  • Are you asking for some kind of animation, maybe a fade in or a slide effect like in powerpoint? In any case - please specify your needs. – SnowballTwo Apr 19 '14 at 18:02
  • @SnowballTwo, animation is more suit, I think. I want to slowly draw each letter pixel by pixel (or line by line, I don't know). And do it in straight order (that is, first letter, then second, etc.). Something like this: http://www.youtube.com/watch?v=IGf9YRpFcFQ&t=451. And it's need to be good-looking (phrase to animate: "Happy Birthday"). Is it possible in WPF? – Max Apr 19 '14 at 18:36
  • OK, you won't achieve exactly the same effect as in the video with WPF without an enourmous amount of programming (It seems like they trace the font stroke, like its drawn. That seems like some kind of heuristic hack, since some fonts dont consist of One-Stroke-Letters). Whatever you actually plan to do... first advice: why not use flash and follow the video tutorial? Second advice: see the next post... – SnowballTwo Apr 20 '14 at 20:49

1 Answers1

0

Create a FormattedText Object with your text and font. Then call BuildGeometry on that object. The function will return a geometry which you can display as a PathGeometry. Now you can add a RectangleGeometry as Clip-Property to this Path. You could animate the width of the Rectangle from 0 to the rendered text's width. This will result in a horizontal blend effect, but maybe this could also be achieved easier somehow.

One thing which just came to my mind - you could simply display the text in a container - let's say a grid - which has set the ClipToBounds property to true, and animate the margin, from something lower than the text's negative width to 0. It will somehow slide in from the right... be creative :D...

SnowballTwo
  • 529
  • 2
  • 11