how to dynamically Change Background Color of the Page on timer after Page load in windows phone 7. Suppose there are 4-5 colors that need to be change after particular time.
Asked
Active
Viewed 265 times
1 Answers
1
You can use DispatcherTimer for this operation.
Use the method below in your page and call it from PhoneApplicationPage_Loaded
event.
Suppose you have to change background color every 5 seconds,
private void ChangeBackgroundColor()
{
DispatcherTimer dt = new DispatcherTimer();
dt.Interval = TimeSpan.FromMilliseconds(5000);
dt.Tick += (s, e) =>
{
//Code for change background color
};
dt.Start();
}
This will process every 5 seconds.

Nelson T Joseph
- 2,683
- 8
- 39
- 56