Open memoarfaa opened 1 year ago
@memoarfaa just to confirm I understand the issue correctly - is the issue related to to the fact the form remains in focus? If yes - why is it important, and how is it affecting your developer experience?
is the issue related to to the fact the form remains in focus? yes Save time while designing
Looking at your animation, it looks like you're running a custom form with custom properties and behaviours (doing NC-painting?)....
Yes true https://github.com/memoarfaa/SkinFormCore
I just started a new theme library that has been converted from Winforms .Net framework to .net Core but .net Core designer is not responding to any Nc painting until Close and reopen the form every time
I fixed the Nc painting by add SetWindowPos to every property but I still can't get Inactive title bar color because .net Core designer doesn't take care about WM_NCACTIVATE message . any idea.
SetWindowPos(Handle, IntPtr.Zero, 0, 0, 0, 0, (int)(SWPFlags.SWP_NOACTIVATE | SWPFlags.SWP_NOMOVE | SWPFlags.SWP_NOSIZE | SWPFlags.SWP_NOZORDER | SWPFlags.SWP_FRAMECHANGED));
Yes true memoarfaa/SkinFormCore
This looks pretty cool. What license have you put your code under?
MIT License Any suggestion to make it widely used in .Net Core Winforms is Welcome
If you're up for a challenge, we have some long-standing issues with MDI child window rendering - https://github.com/dotnet/winforms/issues/3691. The root issue is within the realms of Windows code, but there's no hope it'll ever be fixed. So an alternative would be to come up with a Windows Forms opt-in functionality (e.g., a renderer of some kind) that would allow rendering NC-area of the MDI child windows to look native. 😉
In short answer issues https://github.com/dotnet/winforms/issues/3691. solved in memoarfaa/SkinFormCore
1- download
SkinFormCore v1
2- Add refence to SkinFramWorkCore.dll
in your project
3- Create new MDI Window
4- Create methods to Show child window
new SkinForm() { MdiParent = this }.Show();
Result is
I'm also attached simple project
I'm waiting the answer about your test result in any operating system 8,8.1,10,11
@lonitra would be super interested in what you're doing with the skinning, thank you for sharing! This is something we will have to investigate in our out of process designer. It might be that the window needs to be invalidated to force it to repaint.
Environment
Microsoft Visual Studio Enterprise 2019 Version 16.11.20
.NET version
.NET Core 3.1 and.NET 5
Did this work in a previous version of Visual Studio and/or previous .NET release?
No
Issue description
designer doesn't take care about window state Activation state of form
Steps to reproduce
open new form in design mode click Properties
.net framwork
Diagnostics
No response