Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4840

How to edit the function of the close button on MAUI Blazor Hybrid

$
0
0

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;                });            });#endif

Close button

I mean this button.


Viewing all articles
Browse latest Browse all 4840

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>