Customized title bar is not supporting window 11 split screen features

Sachin 21 Reputation points
2021-09-29T13:17:42.7+00:00

We have a WPF app using a custom Maximize/Restore button. In Windows 11, when we mouse hover on maximize/restore button does not pop up split screen feature like below:

136324-image.png

Does anyone have any idea fixing this issue?

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,787 questions
0 comments No comments
{count} votes

Accepted answer
  1. Hui Liu-MSFT 48,571 Reputation points Microsoft Vendor
    2021-09-30T02:14:34.393+00:00

    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.

    If you have a custom title bar, you can:

    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 HTMAXBUTTON for the maximize/restore button).


    If the response is helpful, please click "Accept Answer" and upvote it.
    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.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.