Freelance Project Requests info@CodeDocu.de Software Development in C# WPF Asp.Net Core Vba Excel Word SQL-Server EF Linq, UWP Net
#

 

How to load a string like HTML into a browser control in WPF?

 

//--< loadHTML String to Browser >--

string sTest = "<html>hallo this is a html-String</html>";

ctlBrowser.NavigateToString(sTest);

//--</ loadHTML String to Browser >--

 

 

 

 

 

The Web Browser Control is available under Windows.Forms, WPF, and UWP.

However, the functions are not the same everywhere.

 

In XAML / WPF:

<WebBrowser Grid.Row="2" x:Name="ctlBrowser" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />

 

BrowserControl included in a WPF Windows.

 

You can find the WebBrowserControl in the existing WPF toolbox controls.

No additional tools need to be installed.

Mobile
»
WPF Datagrid: Set Color of Row when it has no Focus
»
WPF Datagrid: Change the Color of Selected Row
»
WPF: Change Selected Row Color in DataGrid
»
WPF: Read SelectedItem from DataGrid with Dynamic As Anonymous Type
»
WPF: Elements too wide, edge Cut off
»
Solved: System.InvalidCastException HResult 0x80004002 in Select DataGrid
»
WPF: Combobox Selected Value
»
WPF Datagrid: Column is not displayed
»
WPF: Show video in preview
»
WPF Webbrowser: Suppress Java Errors or Set WebBrowser to Silent

.

Contact for Jobs, Project Requests: raimund.popp@microsoft-programmierer.de