Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Control shim? #92

Open
csharpfritz opened this issue Feb 17, 2020 · 4 comments
Open

Custom Control shim? #92

csharpfritz opened this issue Feb 17, 2020 · 4 comments
Labels
help wanted Extra attention is needed question Further information is requested
Milestone

Comments

@csharpfritz
Copy link
Contributor

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

@csharpfritz csharpfritz added help wanted Extra attention is needed question Further information is requested labels Feb 17, 2020
@csharpfritz csharpfritz added this to the Future milestone Feb 17, 2020
@twsouthwick
Copy link

twsouthwick commented Mar 31, 2020

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:

  • Need an HtmlTextWriter
  • Support for ControlCollection
  • FindControl(string id)

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:

  • Fritz.BlazorWebFormsComponents.HtmlTextWriter
  • Fritz.BlazorWebFormsComponents.UserControl

@twsouthwick
Copy link

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

@csharpfritz
Copy link
Contributor Author

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

@hishamco
Copy link
Collaborator

hishamco commented Sep 5, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants