Rendering |
public class RenderingTimer : ICompositionRenderingSubscriber
The RenderingTimer type exposes the following members.
Name | Description | |
---|---|---|
RenderingTimer | Constructor |
Name | Description | |
---|---|---|
Duration | Duration in which the Progress goes from 0.0 to 1.0 | |
Progress | The current Progress value (during animation its goes from 0.0 to 1.0) | |
RepeatForever | If true than the timer is not stopped when Progress = 1.0, but the Progress is set to 0.0 (Default value is false). |
Name | Description | |
---|---|---|
OnTick | OnTick occurs on each rendering event and triggers the Tick event | |
Start | Starts the RenderingTimer animation | |
Stop | Stops the RenderingTimer animation |
Name | Description | |
---|---|---|
Completed | Event that is raised when the animation is completed. | |
Tick | Event that is raised every time the Progress value is changed (on every frame - rendering pass) |
The RenderingTimer can be used to create manual animations that depend only on the animation Duration and are not affected by the actual computer speed (frames per second).
The RenderingTimer changes the value of Progress property from 0 to 1. At the start of animation the Progress value is 0, at the time of Duration the value of Progress is 1. If RepeatForever value is true, the animation repeats again with setting Progress back to 0. On each Progress change (on each frame) the Tick event is raised. When the animation is finished the Completed event is raised (if RepeatForever is not true).
To start the animation the Start method must be called. The animation can be stopped by calling Stop method.