简体   繁体   English

从C#项目页面导航到Javascript项目页面Windows Phone 8.1

[英]Navigate from a C# Project Page to Javascript Project Page Windows Phone 8.1

I am stuck at this problem. 我陷入这个问题。 I have two Projects in Windows Phone 8.1 (WinRT), one project is C# Windows Phone Project named "CSharp_App" and the other project is JavaScript Windows Phone Project named "JS_App". 我在Windows Phone 8.1(WinRT)中有两个项目,一个项目是名为“ CSharp_App”的C#Windows Phone项目,另一个项目是名为“ JS_App”的JavaScript Windows Phone项目。 Both of the Projects are under a same solution. 两个项目都处于同一解决方案下。

Now, my question is, is it possible to navigate from the C# App to the JavaScript App? 现在,我的问题是,是否可以从C#应用程序导航到JavaScript应用程序?

Suppose I have MainPage.xaml and MainPage.xaml.cs. 假设我有MainPage.xaml和MainPage.xaml.cs。 I want to navigate from MainPage.xaml.cs to default.html - is it possible? 我想从MainPage.xaml.cs导航到default.html-可以吗? Any help will be really helpful. 任何帮助都会非常有帮助。 Thanks in advance. 提前致谢。

No, within the same app you cannot navigate from a XAML page to an HTML page. 不可以,在同一应用程序中,您无法从XAML页面导航到HTML页面。

You can use the WebView XAML control in your C# XAML app to embed HTML in your XAML application as a control. 您可以在C#XAML应用程序中使用WebView XAML控件将HTML作为控件嵌入到XAML应用程序中。 However the HTML is displayed as it is displayed in the browser and has no access to WinRT. 但是,HTML会显示在浏览器中,并且无法访问WinRT。

You can have two different apps, one C# and one JavaScript and have them register to handle a custom URI scheme which you can launch to get from one app to the other. 您可以拥有两个不同的应用程序,一个C#和一个JavaScript,并进行注册以处理自定义URI方案 ,您可以启动方案以将其从一个应用程序移植到另一个应用程序。

But if you're trying to create a sort of hybrid XAML+JavaScript app, that isn't really supported for Windows Phone 8.1 但是,如果您尝试创建一种混合XAML + JavaScript应用程序,则Windows Phone 8.1并不真正支持该应用程序

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM