javascript - 将 JavaScript 中的 UI 集成到 UWP 应用中

标签 javascript uwp

我正在开发一个 UWP 应用程序,并且该应用程序的 UI 部分是用 javascript 开发的。我想知道是否可以在 UWP 应用程序中嵌入或集成此 UI javascript,或者我需要在 UWP 中重写整个 UI。有谁知道吗?

提前致谢!

最佳答案

Webview的逻辑。

您可以在其中定义应用程序的 URL,并且它在应用程序中加载,就像它是应用程序一样。

在 Windows 中,类似 thsi

在 XAML 中

<WebView .../>

类里面

try
{
    Uri targetUri = new Uri(Address.Text);
    webView1.Navigate(targetUri);
}
catch (FormatException ex)
{
    // Bad address.
}

您可以查看更多详细信息here

关于javascript - 将 JavaScript 中的 UI 集成到 UWP 应用中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51414223/

相关文章:

c# - 带有 BackgroundTask 的 UWP 应用程序将不再构建错误 80080204

javascript - 使用 Knockout 和 jQuery 延迟加载图像

javascript - 如何找到一个html元素然后删除它?

javascript - Angular 路由在不同的浏览器中表现奇怪/不同

c# - Windows 10 中的鼠标滑动

c# - uwp xaml 解析失败,类库 dll

c++ - 在 Windows 通用应用程序中使用 curl

c++ - Xbox 360 无线 Controller 无法通过控制台应用程序中的 C++/WinRT 和 Windows.Gaming.Input API 工作

javascript - 拉斐尔路径未显示

javascript - 使用VBS登录脚本