可以在紧凑版 mobile 6 手机表单中渲染 html 吗?
我想知道是否有人知道是否可以在 mobile 6 表单中渲染 html?我认为唯一可行的方法是内部网络浏览器控件。
我想知道有更好的方法吗?我想如果我走网络浏览器控制的路径,我将必须生成一个 html 文件,然后将我想要的代码插入到该文件中。
我需要这样的东西,因为我正在拉入一些可能使用 html 内容(例如字体粗细)进行格式化的文本。
I am wondering does anyone know if it is possible to render html in a mobile 6 form? The only way I can think that may work is the internal web browser control.
I am wondering is there a better way? I am thinking if I go the path of web browser control I will have to generate an html file then insert the code I want into this file.
I need something like this because I am pulling in some text that can possibly be formatted with html stuff such as font weight.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
浏览器控件实际上是唯一的方法(除非您想自己解析 HTML 并将其转换为 RTF 控件的富文本,或者更糟糕的是,您自己手动处理所有这些)。
A Browser Control is really the only way (unless you want to parse the HTML yourself and turn it into rich text for an RTF control, or worse, manually handle it all yourself).
正如人们所说,您确实需要 2 个控件,但隐藏常规文本框(可能在浏览器控件后面)仍然可以使其可编辑。
在这种情况下,虽然它可以使用
mytext
这样的代码进行控制,但用户永远不会看到这给他们带来了所见即所得编辑器的错觉(尽管我已经可以想象一个尝试此操作时可能会遇到一些问题)As people have said you do need 2 controls, but it might be possible to hide the regular textbox (maybe behind the browser control) will still leaving it editable.
In this case although it would be controlled underneath with code like
<b>mytext</b>
, the user would never see that giving them some illusion of a WYSIWYG editor (though I can already imagine a few problems you might come into attempting this)我编写了一个 .NET 的 HTML 编辑控件。
它目前不支持 Windows Mobile:但我自己有 Windows Mobile 开发经验,如果您愿意为此付费,我也许可以将其移植到 Compact Framework,如 开发新功能部分。
I have written an HTML edit control for .NET.
It doesn't currently support Windows Mobile: but I have Windows Mobile development experience myself, and I might be able to port it to the Compact Framework, if you would be willing to pay for that, as explained in the Developing New Functionality section.