简体   繁体   中英

windows 8.1 assigned access for Desktop App

I have a Desktop Application written in WPF (originally for Windows 7) that I would like to run in Kiosk (Assign Access mode) on a Microsoft Surface Pro 2. The assigned access feature looked perfect, but it doesn't support non-store apps.

I just need a way to prevent the user from switching to another app or getting access to the OS etc.

Possible?

  1. Make your application fullscreen as shown here: full screen wpf

  2. In your main window constructor subscribe on Deactivate event or override OnDeactivate method:

      Deactivated += delegate(object sender, EventArgs e) { Activate(); }; 
  3. You would also want to prevent the window from Alt+F4 closing by handling the Closing event on such a way:

      Closing += delegate(object sender, CancelEventArgs e) { if(!Environment.HasShutdownStarted) e.Cancel = true; }; 

After all done, the application is closable only by task manager, sign out and shutdown.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM