SteveSandersonMS / WebWindow

.NET Core library to open native OS windows containing web UI on Windows, Mac, and Linux. Experimental.
Apache License 2.0
1.99k stars 215 forks source link

WebWindow in kiosk mode #58

Closed grahamehorner closed 4 years ago

grahamehorner commented 4 years ago

Please consider kiosk style applications via a simple WebWindowOptions.Mode enumerable flag, which makes the window fixed full screen (no close, minimize, maximize, restore) title or menu + top-most; and can be ran as a single-app kiosk in windows 10 https://docs.microsoft.com/en-us/windows/configuration/kiosk-single-app or similar on other platforms.

616E64726173 commented 4 years ago

+1

If this is ever to be taken seriously, we need to be able to disable the right click menu; the touch gestures, etc.

grahamehorner commented 4 years ago

@616E64726173 I believe these should be raised as a different issue; IMHO disabling touch gestures and mouse click would be done on a case-by-case basis; some kiosk application may require these i.e.. mapping pan/zoom/area selection etc. I'm of the understanding that touch gestures map to mouse operations?

AFAIW right click menu can be done already intercepting the mouse click event.

616E64726173 commented 4 years ago

We are able to disable most of these events in Javascript, yes, but it's going to differ per renderer. Ideally we would have some kind of configuration object, per 'window', that determines the functionality scope on the invocation level in a manner that is reliably cross-platform.

I agree, maybe this should be a separate issue but it is related to the Kiosk Mode since what determines 'kiosk' is subjective - disabling panning, disabling exiting, minimization, etc should all configurable rather than just "KioskMode = true". Ideally we would store these flags inside of enums with a "KioskMode" where all the flags are set to true.

Naturally there are much more pressing issues such as having multiple windows open at once and the ability to programmatically close them from C# which right now is my biggest blocker from using it since you can't close a window from within javascript. (e.g a login screen that prompts the user to login, and closes upon success.)

Maybe we should even be exposing WebWindow as an Interface and forcing the developer to create classes derived from it and explicitly state the configuration behavior rather than creating generic objects with default configurations. Encapsulating the window logic inside of classes makes more sense to me.

I am just glad that this project is receiving any attention at all because it makes 'electron' style applications much more viable in NETCore without the need to bundle 2 tons of cement to ship a calculator.

SteveSandersonMS commented 4 years ago

Thanks for the suggestion! I'd be happy to consider accepting a PR that adds this functionality.