A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
Hi,@LoveC. Welcome to Microsoft Q&A Forum.
The main window of your application has the maximize caption button available but does not show snap layouts, it may be because you've customized your caption buttons or title bar in a way that prevents it.
Use the Windows App SDK windowing APIs and have the platform draw and implement the caption buttons for you. For Win32 apps, make sure you are responding appropriately to WM_NCHITTEST (with a return value of
HTMAXBUTTONfor the maximize/restore button).
And link https://github.com/dotnet/wpf/issues/4825 is a discussion and solution about customizing the title bar snap layout. Among them, you could try the code sample to see if they help you.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.