logo
  • 教程列表
  • SO官方文檔
  • WebView 導航
    • 從應用包中開啟 HTML 檔案
    • 導航到 Uri
    • 使用 HttpRequestMessage 導航
    • 導航到字串
    • 從 app 本地資料夾或臨時資料夾開啟 HTML 檔案
    • NavigateToLocalStreamUri
  1. StackOverflow 文件
  2. uwp 教程
  3. WebView 導航
  4. 導航到字串

導航到字串

Created: November-22, 2018

在 WebView 中顯示指定的 html 字串:

var htmlString = 
    @"<!DOCTYPE html>
      <html>
          <head><title>HTML document</title></head>
          <body>
              <p>This is simple HTML content.</p>
          </body>
      </html>";

this.webView.NavigateToString(htmlString);
  • 從 app 本地資料夾或臨時資料夾開啟 HTML 檔案
  • 使用 HttpRequestMessage 導航

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明