Comments (7)
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
please visit class MyCustomCssBoxGenerator ( see https://github.com/LayoutFarm/HtmlRenderer/blob/master/Source/LayoutFarm.YourHtmlWidget/5_HtmlBox/MyCustomCssBoxGenerator.cs#L10)
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
(both are implemented with PixelFarm's UI control)
you can add other tags.
from htmlrenderer.
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
from htmlrenderer.
Above, in this version, all controls are 'Windowless' control.
Do you want 'Window/ Native' control ?
from htmlrenderer.
If you want to add more MyCustomCssBoxGenerator or replace it
please see here:
https://github.com/LayoutFarm/HtmlRenderer/blob/master/Source/Test3_MixHtml/HtmlHostCreatorHelper.cs#L34
from htmlrenderer.
can i add winforms controls?
from htmlrenderer.
It is possible.
But I need some modification,
because in this version all controls are 'Windowless'.
But I'm also thinking about adding a 'Window' control too.
There are 2 ways.
-
Direct embed the control into the host.
=> in this way the 'Windowless' object can't show on top of it. -
Indirect embed the control =>
hide actual control,
and copy Hdc of it and render into a dedicated html element object.
and route mouse/keyboard event to the actual control.
What do you think about it?
from htmlrenderer.
yes thats a good idea
from htmlrenderer.
Related Issues (20)
- HAPPY NEW YEAR 2018 :)
- Notes on my intentions HOT 13
- Please have a release that contains binaries HOT 2
- implement MathML HOT 3
- Separate Layout and Rendering
- add webcomponents
- Build problems HOT 9
- Developing Html Input HOT 9
- HtmlHost
- Is this cross-platform HOT 4
- css-houdini
- can use this make a HTML editor? HOT 1
- Won't build by default in VS 2019 HOT 1
- Sync this with the original repo and point the original repo to here HOT 3
- could you port this to AvaloniaUI? HOT 1
- Trying to build on Ubuntu 19 HOT 16
- Can not compile on VS2015 HOT 2
- a idea for make a new ui by html-Renderer(HtmlRenderer)
- System.DllNotFoundException HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from htmlrenderer.