问题标签 [xamarin.uwp]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
xamarin - 在 Xamarin Forms PCL 通用 Windows 应用程序中从 AngularJs 脚本调用 C# 函数
我正在开发一个跨平台的 xamarin 表单应用程序。我创建了一个便携式跨平台应用程序,我试图在其中打开 webview 中的本地 HTML 页面。为了从 Angularjs 调用 C# 函数,我实现了混合 Web 视图概念。
我的 Angularjs 函数
在我的通用 Windows 项目中
我的 commInterface 类
就像在 Android 项目中一样,我使用 CommInterface 类与 Portable 库中的数据库类进行通信。但是在我的通用 Windows 项目中,我无法与 Csharp 函数通信以运行 CSharp CRUD 函数。如何从脚本调用 CSharp 函数?
xaml - Xamarin forms relative layout position stacklayout at bottom
I would like to position a Stacklayout at the bottom on top of an image using a relative layout using Xamarin forms using xaml only. The xaml pretty much looks like this.
What X and Y constraints should my StackLayout have so that it is positioned on top of the image and at the bottom of it.Also added an image which describes the result i expect.
I did try to give RelativeLayout.XConstraints and RelativeLayout.YConstraints to both the image and the stacklayout , but not able to figure out what values to use to get the desired result.
xaml - 将 UWP 标头模板中的图标与 xamarin.froms 一起使用
我正在使用 Xamarin.Forms 编写应用程序,并且我想在 UWP 应用程序的选项卡式页面中显示图标。为了实现这一点,我正在尝试使用自定义渲染器。自定义渲染器代码是
数据模板样式为:
问题是标题工作正常,但图标从不出现,但是它们被正确分配给 Forms.Xaml 中的每个页面。
我做错了什么?
oauth-2.0 - Azure 移动服务 LoginAsync 方法不适用于 Microsoft Auth Token
我已经成功地在我的 Xamarin 表单应用程序中使用客户端身份验证获取 access_token(或 Microsoft 令牌的 authenticationToken)。我能够使用相同的访问令牌获取更多用户信息(电子邮件、姓名等)。现在,当我尝试将该令牌传递到我的 Azure 移动服务后端时,我收到 401 错误。
这是我的代码:
上面的代码片段可用于获取我的用户详细信息。现在,当我尝试在后续调用中使用相同的令牌时,我得到一个 404:
有什么我做错了吗?感谢您提供任何和所有帮助。
c# - 我可以跳过 UWP 项目中的链接程序集吗?
我使用 xamarin 形式。我对 Xamarin.UWP 上的“Newtonsoft.Json.JsonConvert.DeserializeObject”NullReferenceException 崩溃有问题,仅在发布模式下(在调试工作中,但在发布中没有)。我看到,我可以将 System.Core;System.Runtime.Serialization 添加到 Skip 链接程序集以修复它。在 Android 项目中我找到了这个菜单,但在 UWP 项目中没有。我能做些什么?
c# - Xamarin.Forms 应用程序上的 SQlite 实现
我有一个 Xamarin.Forms 应用程序,我需要能够管理数据库。我正在 Microsoft Visual Studio 2017 中进行开发,并且正在关注 SQLite 的本教程:https ://msdn.microsoft.com/en-us/magazine/mt736454.aspx
问题是当我进入正题时: 图 6 在通用 Windows 项目中生成连接字符串,即实现 DatabaseConnection_UWP.cs 类。有一些错误:
这里它说:找不到类型或命名空间名称“LocalDataAccess”(您是否缺少 using 指令或程序集引用?)
并在行中:
它说:找不到类型或命名空间名称“DatabaseConnection_UWP”(您是否缺少 using 指令或程序集引用?)
代码完全一样,我所做的只是从教程中复制粘贴。
xamarin.android - 我无法构建 Zebble 生成的 UWP 项目
我使用 Zebble Extension for Visual Studio 创建了一个示例项目。相关项目创建成功,但不幸的是,当我尝试编译 UWP 项目时,构建过程失败并出现以下错误:
我该如何解决?
xamarin - 在 Xamarin.Forms WebView 上通过 HTML 字符串显示图像
所以,我想在我的 Xamarin.Forms 应用程序中的 WebView 上显示 html 页面。html 页面包含大量本地存储的图像(Android 和 iOS 上的 PersonalFolder 和 UWP 上的 WindowsStorage LocalFolder)。
对于 Android,它运行良好(尚未在 iOS 上测试),我可以显示图像。但是它似乎不适用于 UWP。在对多个论坛进行一些研究后,我得出结论,通过 html 字符串在 WebView 上显示图像的唯一方法是将图像转换为 Base64 字符串。
这确实有效,但是从磁盘读取图像并转换为 Base64 的过程比我预期的要花一些时间(即使在高端 PC 上也是如此)。我的另一个选择是将 Base64 字符串保存到我的 SQLite 数据库中,但在这里我担心数据库会急剧增长。
我的图片是从网上动态下载的,不能作为项目的一部分包含在“资产”文件夹中。
如果这些是唯一的方法,谁能帮助我理解?有更好的选择吗?我希望我可以像在 Android 上一样在 UWP 上显示图像。