Krypton-Suite / Standard-Toolkit

An update to Component factory's krypton toolkit to support .NET Framework 4.6.2 - 4.8.1 to .NET 6 - 8
BSD 3-Clause "New" or "Revised" License
388 stars 57 forks source link

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

Open PWagner1 opened 2 years ago

PWagner1 commented 2 years ago

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

Smurf-IV commented 2 years ago

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

PWagner1 commented 2 years ago

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

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

Smurf-IV commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

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

PWagner1 commented 2 years ago

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

Smurf-IV commented 2 years ago

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. :-(

PWagner1 commented 2 years ago

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.

Smurf-IV commented 2 years ago

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

If I

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 !

PWagner1 commented 2 years ago

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

Smurf-IV commented 2 years ago

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 !

PWagner1 commented 2 years ago

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

Smurf-IV commented 2 years ago

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 ?

PWagner1 commented 2 years ago

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?

Smurf-IV commented 2 years ago

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 commented 2 years ago

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

Smurf-IV commented 2 years ago

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

Smurf-IV commented 1 year ago

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 commented 10 months ago

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 !

PWagner1 commented 6 months ago

Hi @Smurf-IV & @sneusse

There has been movement in this area in VS 17.9

PWagner1 commented 6 months ago

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

Smurf-IV commented 6 months ago

@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

Camel-RD commented 6 months ago

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

mbagattini commented 3 months ago

I'm struggling designing Krypton controls after upgrading a solution from .NET Framework 4.8 to .NET 6. Some controls simply refuse to be designed in the usual way (on the Windows Forms designer surface), I have to fiddle with the properties box and it's very frustrating. I checked the "preview" thing in the Environment section under controls but no luck. Is there any workaround to be able to design controls (for example, work with Krypton Ribbon) as it was under .NET 4.8?

PWagner1 commented 3 months ago

I'm struggling designing Krypton controls after upgrading a solution from .NET Framework 4.8 to .NET 6. Some controls simply refuse to be designed in the usual way (on the Windows Forms designer surface), I have to fiddle with the properties box and it's very frustrating. I checked the "preview" thing in the Environment section under controls but no luck. Is there any workaround to be able to design controls (for example, work with Krypton Ribbon) as it was under .NET 4.8?

Hi @mbagattini

There is a workaround, I've just updated the online documentation, but it won't be available until tomorrow when it'll be merged. The short of it is you need to set the TargetFrameworks to 'net48;netx.0-windows'. 'x' denotes the .NET version, 6, 8 or 9. Please do not use .NET 7, as support ends on 14th May 2024.

PWagner1 commented 3 months ago

Putting this here (VS 17.10)

Smurf-IV commented 2 months ago

MS are still having issues: This is still not fixed in 17.77.p3