I have been searching for a while for how to trigger a screen lock on windows programmatically from a UWP app, but the only thing found from MSDN is this and it doesn't even trigger a lock screen event. It creates a new lock screen. My use case is this: I verify users via a UWP i have developed. If for one user the verification fails, i want to trigger the PC lock for this user.
Is this even possible through a UWP?
Thank you in advance!
Currently, there is no such api that could take over lock screen within uwp platform. For
Windows.ApplicationModel.LockScreenapi that is use to let your app show an indicator on the lock screen, not for taking over the lock screen. For more info please refer link here.