Start an app on fullSreem on mac
I did this for Windows
.ConfigureLifecycleEvents(events => {
#if WINDOWS
events.AddWindows(windows => windows
.OnWindowCreated((window) => {
window.ExtendsContentIntoTitleBar = false;
var handle = WinRT.Interop.WindowNative.GetWindowHandle(window);
var id = Microsoft.UI.Win32Interop.GetWindowIdFromWindow(handle);
var appWindow = Microsoft.UI.Windowing.AppWindow.GetFromWindowId(id);
switch (appWindow.Presenter) {
case Microsoft.UI.Windowing.OverlappedPresenter overlappedPresenter:
overlappedPresenter.Maximize();
break;
}
}));
#endif
.ConfigureLifecycleEvents(events => {
#if WINDOWS
events.AddWindows(windows => windows
.OnWindowCreated((window) => {
window.ExtendsContentIntoTitleBar = false;
var handle = WinRT.Interop.WindowNative.GetWindowHandle(window);
var id = Microsoft.UI.Win32Interop.GetWindowIdFromWindow(handle);
var appWindow = Microsoft.UI.Windowing.AppWindow.GetFromWindowId(id);
switch (appWindow.Presenter) {
case Microsoft.UI.Windowing.OverlappedPresenter overlappedPresenter:
overlappedPresenter.Maximize();
break;
}
}));
#endif
0 Replies