Scenario where DesignMode is false from the NET WinForms OOP designer #7448
Unanswered
tracktownsoftware
asked this question in
Q&A
Replies: 1 comment 3 replies
-
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
When using my NET6 Windows Forms custom control to display a dialog at design time, the DesignMode value is incorrectly false even though it is running in the DesignToolsServer process.
Reproduction Steps
My github sample to reproduce:
https://github.com/tracktownsoftware/MicrosoftWinFormsDesignerSDK_DesignModeBug
The above repository includes a Nuget package you can use to test and reproduce. The nuget package contains a custom NET6 WinForms "MyButton" control with WinForms Designer Extensibility SDK design-time support.
Expected behavior
DesignMode should be true because it is running in the DesignToolsServer process.
Actual behavior
DesignMode is false.
See https://github.com/tracktownsoftware/MicrosoftWinFormsDesignerSDK_DesignModeBug/blob/main/README.md
Regression?
No response
Known Workarounds
Rather than using DesignMode check for System.Diagnostics.Process.GetCurrentProcess().ProcessName=="DesignToolsServer"
Configuration
No response
Other information
No response
Beta Was this translation helpful? Give feedback.
All reactions