C
C#2mo ago
eduardoA

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
No replies yetBe the first to reply to this messageJoin