I am working on an application written in MAUI Blazor.I would like that after click on the red button "Close", to bring up the message "Are you sure you want to close the application?".How to modify the function of the close system button on Windows?I tried used OnClosed event but I don't know how to use it correctly.
#if WINDOWS events.AddWindows(wndLifeCycleBuilder => { wndLifeCycleBuilder.OnClosed((window, args) => LogEvent("OnClosed")); wndLifeCycleBuilder.OnWindowCreated(window => { //Set size and center on screen using WinUIEx extension method window.CenterOnScreen(400, 750); window.ExtendsContentIntoTitleBar = true; }); });#endifI mean this button.
