A
A
Alexey Pavlov2018-11-28 16:54:09
WPF
Alexey Pavlov, 2018-11-28 16:54:09

How to remove the black background when opening a minimized window?

There is a WPF window with properties WindowStyle=None and AllowsTransparency=False. If you collapse it and then expand it, then a black background appears before opening the content, which does not look very good. If there is a lot of content, then this black background is shown for quite a long time. Occurs because when minimized, the previous content disappears and is rebuilt after the window is restored.
If you set AllowsTransparency=True, then the old content does not disappear, and the previous content (for example, the content of the old tab) is visible before showing the new content. Looks better than the black background, but not quite right. Plus, AllowsTransparency cannot be set (there is a WindowsFormsHost in the window, which does not work in a window with transparency).
I tried not to minimize the window, but to hide it (Visibility=Hidden), but then the window is hidden from the taskbar, and it didn't show up there.
Has anyone experienced this behavior?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question