Reply to thread

Hi there!


I was wondering if xaml does have an option to have a timer. For example to update the current (real) time every 5 seconds)


I have tried this code below but without success.


[CODE=csharp]public void UpdateValues()

{

    System.Timers.Timer tValueUpdater = new System.Timers.Timer();

    tValueUpdater.Interval = 500;

    tValueUpdater.Elapsed += OnTimedEvent;

    tValueUpdater.Enabled = true;

}


private void OnTimedEvent(object sender, System.Timers.ElapsedEventArgs e)

{

    resc.GetLiveTemperature();

    resc.GetValues();

    AppDesigner();


    lHeaderFooter.Text = DateTime.Now.ToString();


}[/CODE]


Top