I have a WPF app that installed on Windows 10 Pro via ClickOnce and uses MahApps.Metro.
It is set to launch on Windows boot with a non-admin account that has no password. Tablet mode is enabled.
I want the application pop up full screen to create kiosk-like experience, however the app starts minimized when launching on boot. To clarify, the WindowState is Maximized, but Windows does not show it, instead it shows the start screen. It launches fullscreen maximized when launching manually.
Here is some code, however I guess this is more of a configuration problem than code problem:
This is how I set the launch on boot:
RegistryKey rkApp = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", true);
string startPath = Environment.GetFolderPath(Environment.SpecialFolder.Programs)
+ @"\Publisher\AppName.appref-ms";
rkApp.SetValue("AppName", startPath);
This is MainWindow.xaml
<Controls:MetroWindow x:Class="AppName.MainWindow"
IgnoreTaskbarOnMaximize="True" ShowTitleBar="False" WindowStyle="None" WindowState="Maximized">
...
</Controls:MetroWindow>