title: How i can display HTML code in xamarin app
body: <p>What is the best way to display local HTML code directly into my page.xaml.cs file? I want to write the html code directly into .cs file. thanks</p>
  
  <p>I will use this in my page.xaml.cs</p>
  
  <pre><code>var browser = new WebView();
  var htmlSource = new HtmlWebViewSource();
  htmlSource.Html = @"&lt;html&gt;&lt;body&gt;
    &lt;h1&gt;Xamarin.Forms&lt;/h1&gt;
    &lt;p&gt;Welcome to WebView.&lt;/p&gt;
    &lt;/body&gt;&lt;/html&gt;";
  browser.Source = htmlSource;
  </code></pre>
  
  <p>but in xaml file how I can display this html and put it in a stack layout for example?</p>