Standard-Toolkit icon indicating copy to clipboard operation
Standard-Toolkit copied to clipboard

[Feature Request]: Use the WinForms Designer Extensibility SDK for .NET

Open PWagner1 opened this issue 4 years ago • 29 comments

Since MS is having issues supporting the WinForms designer in .NET, the WinForms Designer Extensibility SDK could be the solution for the current designer issues

PWagner1 avatar Jan 15 '22 08:01 PWagner1

Nice find, All Designer issues should be linked to this.

Smurf-IV avatar Jan 15 '22 08:01 Smurf-IV

Nice find, All Designer issues should be linked to this.

Well it's actually @sdreb3421 who notified me about this.

PWagner1 avatar Jan 15 '22 08:01 PWagner1

Also, (Maybe - it's unclear) a reason some of the .Net5 is not working in a designer might be down to the loading in .Net5Core which has quite a few of the following "Color API's" missing: https://github.com/dotnet/runtime/issues/18476

Smurf-IV avatar Jan 15 '22 08:01 Smurf-IV

@Wagnerp This is going to be "Interesting" Quote: The designers, as per the API specs, need to be implemented inside a NuGet package.

See the middle of the following page: https://www.telerik.com/blogs/new-telerik-ui-for-winforms-designers-dotnet-core-dotnet-5

Smurf-IV avatar Jan 15 '22 09:01 Smurf-IV

And the following Caveats and "Tips'n'tricks" will need to be reformatted to reflect whatever "we" get working for Krypton: https://docs.telerik.com/devtools/winforms/core/design-time

Smurf-IV avatar Jan 15 '22 09:01 Smurf-IV

It's not ideal, but maybe private nightly packages could be used for testing?

PWagner1 avatar Jan 15 '22 09:01 PWagner1

I spent all day yesterday trying to find documentation on how to use this, and came up empty. Telerik and devexpress mention it in their latest "suites", but that's it. :-(

Smurf-IV avatar Jan 16 '22 08:01 Smurf-IV

I spent all day yesterday trying to find documentation on how to use this, and came up empty. Telerik and devexpress mention it in their latest "suites", but that's it. :-(

I think it's because it is so new, there is limited documentation so far. The packages only first appeared back in November.

PWagner1 avatar Jan 16 '22 08:01 PWagner1

I have had an inspiration from the "Read between the lines of why the above is solving things"

If I

  • Remove "ALL" designers references from the toolkit e.g. image

  • Set toolkit project to be "Only" net5 windows

  • Create a new winform net 5 windows only main app

  • build.

  • I get the following showing up in the toolbox: image

I'll need to investigate further to see "What" the designers are attempting to do; but so far I've been able to drag (A random selection not all) controls onto the form !

Smurf-IV avatar Jan 16 '22 08:01 Smurf-IV

Just out of interest, do the action lists show up when using .NET?

PWagner1 avatar Jan 16 '22 08:01 PWagner1

Just out of interest, do the action lists show up when using .NET?

Can you show a specific example, and do you mean in "Net 5" ?

The reason I ask is because of the following statement: image Even when AutoSize for a button is set to true it still has the Resize Handles ! i.e. there is no code that appears to be actually doing the statement in the designer of 4.8 !

Smurf-IV avatar Jan 16 '22 09:01 Smurf-IV

Just out of interest, do the action lists show up when using .NET?

Can you show a specific example, and do you mean in "Net 5" ?

The reason I ask is because of the following statement: image Even when AutoSize for a button is set to true it still has the Resize Handles ! i.e. there is no code that appears to be actually doing the statement in the designer of 4.8 !

Here's what I mean

Animation

PWagner1 avatar Jan 16 '22 09:01 PWagner1

Strange I never use those arrow thingies except for TableLayout So if that is the only thing that is going to be missing (Because the properties will still show) then that can be "Lived" with for now ?? i.e. if not .48 or less than designer are disabled. I can perform the above fix and relate it to the existing designer issues, and leave this one open until more documentation is available . Thoughts ?

Smurf-IV avatar Jan 16 '22 09:01 Smurf-IV

Strange I never use those arrow thingies except for TableLayout So if that is the only thing that is going to be missing (Because the properties will still show) then that can be "Lived" with for now ?? i.e. if not .48 or less than designer are disabled. I can perform the above fix and relate it to the existing designer issues, and leave this one open until more documentation is available . Thoughts ?

This might be a bug on MS part, maybe add this one specifically to the backlog until more documentation comes out?

PWagner1 avatar Jan 16 '22 09:01 PWagner1

This might be a bug on MS part,

Yes, that is what the mentioned (titled) sdk is trying to solve.

maybe add this one specifically to the backlog until more documentation comes out?

Agreed. This will lead to a set of related nuget packages, that will include just the designer for the project and will need to be set so that they do not become runtime references Each TFM will need a dll to contain the designers for the suite element that is included.

Smurf-IV avatar Jan 16 '22 10:01 Smurf-IV

Not sure when it appeared in the "Preview features" but this is in 2022.2.0 preview 3: image

Smurf-IV avatar Apr 16 '22 08:04 Smurf-IV

https://www.nuget.org/packages/Microsoft.WinForms.Designer.SDK "Still" in pre-release: image

Smurf-IV avatar Jul 16 '22 14:07 Smurf-IV

Note this on the process of creating a designer to work in both: https://www.codeproject.com/Articles/5341387/Writing-Custom-Control-in-NET-6

Smurf-IV avatar Jan 15 '23 08:01 Smurf-IV

As seen in the latest 17.8.p3: image

This is still not a "Feature" I want to implement until it is "Stable" in VS Because the workaround - Just Works !

Smurf-IV avatar Oct 16 '23 16:10 Smurf-IV

Hi @Smurf-IV & @sneusse

There has been movement in this area in VS 17.9

PWagner1 avatar Feb 13 '24 18:02 PWagner1

@Smurf-IV I don't know if this is relevant?

PWagner1 avatar Mar 02 '24 17:03 PWagner1

@Smurf-IV I don't know if this is relevant?

No I do not think it is, because Krypton is "Any CPU" and not just This specific hurdle has emerged as a significant adoption blocker for users with Windows Forms .NET Framework projects that extensively leverage ActiveX/COM controls or other custom controls embedded in 32-bit assemblies

Smurf-IV avatar Mar 03 '24 08:03 Smurf-IV

Maybe something like this could be usefull: https://github.com/Camel-RD/KlonsLIB.Design

Camel-RD avatar Mar 03 '24 13:03 Camel-RD