-
Notifications
You must be signed in to change notification settings - Fork 40
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
add ability to add custom elements #15
Comments
Thank you for your interest. It is easy and the HtmlRender already has that capability but it is hidden in the code :) If you want to do that and this is an extensible point. (https://github.com/LayoutFarm/HtmlRenderer/blob/master/Source/LayoutFarm.YourHtmlWidget/5_HtmlBox/MyCustomCssBoxGenerator.cs#L24) The code demonstrates "custom control" for input tag and canvas tag |
I will show an example here. Let's begin with Test3_MixHtml => 00.html test case The current Acid1 test page should look like this ... Acid1 test page shows 2 gray boxes (input controls) after 'bang' and 'whimper' the code that renders the 2 small boxes is here (https://github.com/LayoutFarm/HtmlRenderer/blob/master/Source/LayoutFarm.YourHtmlWidget/5_HtmlBox/MyCustomCssBoxGenerator.cs#L131) Now, modify it with this ... in red box, test it, I change bg-color to red and add 'child /sub' label with text 'R' Run again, That's it |
Above, in this version, all controls are 'Windowless' control. Do you want 'Window/ Native' control ? |
If you want to add more MyCustomCssBoxGenerator or replace it please see here: |
can i add winforms controls? |
It is possible. But I'm also thinking about adding a 'Window' control too.
What do you think about it? |
yes thats a good idea |
like ...
adds fastcoloredtextbox as control
The text was updated successfully, but these errors were encountered: