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
Related
I'm looking for a way to show some html, csharp, xml or json code within my UWP app in a formatted way. So I thought about using the control MarkdownTextBlock from the Microsoft.Toolkit.Uwp.UI.Controls library to achieve this.
Witch warping the code with the correct Markdown Fence is working great. But now I would like to be able to scroll down the MarkdownTextBlock end highlights some specific part of the code.
But the control doesn’t seem to allow this.
I'm I wrong?
Currently, there is no available build-in APIs for what you want. I'd suggest you put the MarkdownTextBlock inside a ScrollViewer and try to scroll the ScrollViewer instead. Just like what the sample did: Toolkit SampleApp
I ended up, using Monaco Editor.
With is fantastic!
https://github.com/hawkerm/monaco-editor-uwp
Can I convert an image or text into a link to navigate to another page in the same project in C#? If so, please let me know. I can't seem to figure out how to do it.
Regards.
Can't you just make an image or a text field and do a click command on it?
Then in the click command open the corresponding page.
Wpf support NavigationService, which can be used for navigating between pages
but I never use it, generally MVVM pattern is best way to do that, you can find example project here
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
Please suggest how can write c# to control browser to go to url and auto fill in specific element
Why don't you use WebBrowser Control in C#? Drag the Control from the Toolbar to your Form. Then do webBrowser1.Navigate("http://www.example.com/bla");
fill in the element you want like this: webBrowser1.Document.getElementById("yourID").innerHTML = "some content";
hope this helps,
Alex
Use WatiN project to open browser, go to specific page and do the appropriate. Primarily this is a web testing automation tool, but you could (ab)use it for other things as well.
http://watin.sourceforge.net/
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.