Stopwatch for silverlight?

前端 未结 4 1423
野的像风
野的像风 2021-01-01 12:38

There is no StopWatch for Silverlight.

What would you use instead of it?

I saw some posts about people saying to create an empty animation and call GetCurren

4条回答
  •  再見小時候
    2021-01-01 13:11

    See my watch at here. Source code is here. And two articles about it are here and here. The Silverlight animation model lends itself well to a stopwatch.

    alt text http://xmldocs.net/ball2/background.png

    
    
        
        
    
    
        
        
    
    
        
        
    

    and the code to run that storyboard is here:

    private void RunWatch()
    {
        var time = DateTime.Now;
    
        Run.Begin();
    
        Run.Seek(new TimeSpan(time.Hour, time.Minute, time.Second));
    }
    

提交回复
热议问题