I'm afraid that I have a really hard problem. I need to show html text into a Silverlight DataGrid, I've been trying with the third party Devexpress datagrid and I have no idea how to do this.
Thanks
If you are using Silverlight 4 and the app is running out of browser you might want to give the WebBrowser control a go.
In most other cases I'd try to transform the HTML into XAML.
This could also be an interesting approach putting a div over the silverlight app
Related
My objective is to show the HTML content with style in my WPF application. I am getting a HTML content as response from a API. I need to show the content in a frame ( preferably textblock). I tried with webbrowser control of wpf where I faced many issues on formatting over the grid and I am not able to show transparent background for webbrowser control. I found the issue is due to this.
Sample HTML content :
<p>My <b>para<b></p><ul> <li>My list1</li> <li>My list2</li></ul>
I researched over the internet and found some control for wpf.
Awesomium
WPF Chromium
I am newbie to WPF C# and I don't have idea about how to use the controls in my wpf application. I tried with some sample application from here and here. However, It showing lot of error due to reference missing.
Also I tried with HtmltoXaml converter and WPF Rich box and found that it skips many of the content after rendering.
It would be really helpful for me if I get a simple sample wpf application working without error implemented with above mentioned controls or links that are useful.
Any new idea to overcome my issue also appreciated. Thanks in advance and sorry for my English.
If you need a html5 rendering browser, I'd recommend CEFSharp. It's nugettable, stable and is synced with the latest Chromium code.
There are many applications out there that are displaying html content using XAML controls rather than displaying a web browser. Does anyone know if there is control used for this? If no control is available, what's the best way to do this?
I found this article but that seems to be overkill... Or is it?
http://thewp7dev.wordpress.com/2012/03/05/html-textblock/
I would like to keep the exact format of a web page (i.e. text, images, formatting, etc...) but I'd like if possible at all not use the web browser.
I have a pivot that requires 4 websites to be displayed but it would seem very heavy to create 4 web browser, not to mention I'd like to add different touch functionality that I'm struggling to do using the web browser.
I'd appreciate any feedback.
Thanks
There is no XAML controls for windows phone, except WebBrowser Control (WebView in WP8.1), which can display HTML as it is.
Your article describes exactly what you have to do, to display HTML in some other XAML controls (RichTextBox for example).
You have to parse HTML to XAML format. You can use thrid party components for this (HTML agility Pack http://htmlagilitypack.codeplex.com/) or implement your own parsing.
Also, I don't think, that combining WebBrowser control with Pivot (or Panorama) is a good idea, because it just consumes to much memory and there could be problems with scrolling and touch interaction.
The simple path I think is to reconsider your navigation model and use webbrowser control to display HTML. Maybe you can provide one WebBrowser and 4 links on top to switch between souces.
Is possible to make the .Net Webbrowser control render form elements, like buttons, input text, with winform elements appearance? Using the visual styles of OS to look like an native Windows application not an page displayed in IE?
It is not possible configure or to supply custom rendering for buttons and input controls in IE - without CSS you get what browser decided to use as default.
It is possible to style buttons/input elements with CSS pretty much whatever way you want.
I am not entirely sure what you want to get. Possible you can render the entire form as it is in the broswer. WPF let you embed winform in the browser:
http://www.codeproject.com/Articles/31429/Embedding-a-NET-WinForms-Application-in-an-Interne
It is not possible as #Alexei Levenkov Informed.
But I recommend you to have look over this link where the web browser is created with C#.
So I want to make a htmlpage in a xaml-window. I searched the net, but the only thing I found was how to edit the text, but not how it is shown in the page. I want to create (or use, if it already exists) a toolbox for html. and i want to put this in a xaml-window so I can edit the output of a piece of html code. In the toolbox may be for example: inputfield,image, table
anyone who knows how to do this?
Correct me if I am wrong, if you want to render a HTML page in WPF application, you can use WPF WebBrowser Control.
First of all be specific weather you are working on wpf or silverlight... I don't know much about wpf, but for silverlight try this.. http://forums.silverlight.net/forums/p/13910/157537.aspx
I have a .net (3.5) WinForms application and want to display some html on one of the forms. Is there a control that I can use for this?
Yep sure is, the WebBrowser control.
I was looking at the WebBrowser control but couldn't work out how to assign (set) the HTML to it...?
EDIT: Found it - Document Text
what about the browser control? a bit heavy, but at least you'll get an accurate rendering.