C#循环等待如何实现,让循环每一秒钟执行一次
程序代码:
StrokeCollection strokecollection = new StrokeCollection(); strokecollection = ViewInkcanvas.Strokes.Clone(); ViewInkcanvas.Strokes.Clear(); foreach (Stroke s in strokecollection) { ViewInkcanvas.Strokes.Add(s); //每一秒钟执行一次循环 }