M
M
Michael2014-10-14 16:45:27
Mobile development
Michael, 2014-10-14 16:45:27

How to implement dialog boxes like in Paint.NET?

I want to make the same dialog boxes as in the latest (4.0.3) version of Paint.NET at the moment, but I can't find how to do it correctly. What exactly interests me - I can't figure out how to make the area where the "OK", "Cancel" buttons are located. In the screenshot, I highlighted this place:
cecdfd3ce7194c1eb9662d4f34e5a10d.png
I also note that if you click on this area with the LMB and do not release, you can move the window in the same way as when dragging the window by the title bar.
Interested in the implementation on WPF, but I will consider all available options.
PS: Perhaps the implementation of such a window will be simple, but I did not find how to do it correctly.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
aush, 2014-10-14
@gmikhail94

They implemented this effect by calling the winapi function DwmExtendFrameIntoClientArea - msdn.microsoft.com/ru-ru/library/windows/desktop/a... .

A
Alexander Vishnyakov, 2014-12-27
@asvishnyakov

You were right about DwmExtendFrameIntoClientArea. In .NET 4.0-4.5, it has a wrapper in the form of the WindowChrome class

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question