-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Windows Application Development Cookbook
By :
When the screen is not touched by a user for a long period of time, it could be switched off, depending on the current system settings. Of course, such a situation may be unacceptable in some scenarios, thus it is beneficial to learn how to disable it. You will learn how to do it in this recipe.
As an example, you will prepare a page with the Toggle switching off button. After pressing it, the mechanism of switching off the screen will be disabled or enabled. To simplify your understanding of the current state, the background of the page will be changed to yellow when the mechanism of switching off the screen is disabled.
To step through this recipe, you only need the automatically generated project.
To prepare an example that toggles the mechanism of switching off the screen in an automatic way, perform the following steps:
MainPage.xaml file, as...