Search code examples
c#timeuwpmessage

C# UWP show messageDialog every given time


I'm fairy new to UWP and i'm working on a little personal project, what I want to do essentially is to show a message dialog every given time, or execute a task every given time, is there a way to accomplish this?


Solution

  • Assuming you want to execute a task when the application is on the foreground you can use DispatcherTimer Class to do this. You can have a look at the examples and know more about them.

    If you are trying to execute some tasks on the background (when your application is not running) you have to register a background task . More info here