I am developing an application for Windows Phone 8.
I need to add a countdown function to my application.
as when launching the application. Timer value Show 60,59,58 .... 0
When 0 Reach Show Msg Timeout.
I searched on Google, but I have no idea. [Maybe this is my mistake not in the right search]
I am trying to use the following code that shows date and time values such as [3/12/2014 6:22:10 PM]
C # code
public SensorTwo()
{
InitializeComponent();
DispatcherTimer newTimer = new DispatcherTimer();
newTimer.Interval = TimeSpan.FromSeconds(1);
newTimer.Tick += OnTimerTick;
newTimer.Start();
}
void OnTimerTick(Object sender, EventArgs args)
{
clock.Text = DateTime.Now.ToString();
}
XAML CODE
<TextBlock Foreground="Red" FontSize="22" Name="clock" Width="350" Height="50" HorizontalAlignment="Center" VerticalAlignment="Bottom"></TextBlock>
any help or tell me to complete this functionality ...
source
share