FritzAndFriends / BlazorWebFormsComponents

A collection of Blazor components that emulate the ASP.NET Web Forms controls of the same name
MIT License
427 stars 72 forks source link

Custom Control shim? #92

Open csharpfritz opened 4 years ago

csharpfritz commented 4 years ago

When we consider converting usercontrols, master pages, and pages we also need to consider converting custom controls.

Is there a shim abstract class that we could make available that these classes that inherit from WebControl or CompositeControl could inherit from and be able to work with Blazor?

I think this may be a separate .NET Standard class library to support this goal

twsouthwick commented 4 years ago

I've recently been working on a project that needed this. I'd like to take a look at what would be possible here. Some of the issues I've seen:

That's the order of importance I've seen. I've got a simple custom control working that takes in an HtmlTextWriter and writes out content via the RenderTreeBuilder; I can look at what the WebControl or CompositeControl looks like. I'm happy to submit that as a starting point.

Sounds like a separate assembly would be good for it (HtmlTextWriter itself should probably be in its own assembly as well as it's more general purpose). How about the following:

twsouthwick commented 4 years ago

I just took a look at the structure of the library, and it looks like two of the issues are already available. Nice!

csharpfritz commented 4 years ago

Ooh... HtmlTextWriter sounds like a VERY cool feature to add

hishamco commented 3 years ago

@twsouthwick any updates on this or what you did for a private project?