草庐IT

Xamarin_Forms_Platform_iOS_ModalW

全部标签

c# - 如何从虚拟键代码转换为 System.Windows.Forms.Keys

如果我使用win32调用拦截按键,我现在就有了一个键码。有没有办法将其转换为System.Windows.Forms.Keys值? 最佳答案 使用KeyInterop.KeyFromVirtualKey(). 关于c#-如何从虚拟键代码转换为System.Windows.Forms.Keys,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/554015/

c# - 从IOS图片上传到.net app : Rotate

我有以下代码用于将图片从IOS设备上传到我的.net应用程序并调整其​​大小。用户习惯以纵向拍摄照片,然后所有照片都以错误的旋转方式显示在我的应用程序中。有什么解决方法的建议吗?stringfileName=Server.HtmlEncode(FileUploadFormbilde.FileName);stringextension=System.IO.Path.GetExtension(fileName);System.Drawing.Imageimage_file=System.Drawing.Image.FromStream(FileUploadFormbilde.PostedF

c# - 如何通过单击标签在 Xamarin.Forms 中调用电话?

你好,我有一个正在使用Xamarin.Forms开发的应用程序,它从Web服务获取联系信息,然后在标签中显示该信息,但是我想制作列出电话号码的标签,以便在单击时调用电话.我该怎么做?在我的XAML中://Thisisthelabelthatdisplaysthephonenumber!下面是我的代码:usingNewtonsoft.Json;usingReadyMo.Data;usingSystem;usingSystem.Collections.Generic;usingSystem.Collections.ObjectModel;usingSystem.Linq;usingSyst

c# - 在 Android (Xamarin) 上实现 Office 365 API 的问题

我试图让这个应用程序作为起点运行。https://medium.com/xamarin-development/integrating-office-365-into-xamarin-apps-f9a33e5c73b1.我设置了一个试用帐户,输入了客户端ID等。当我尝试输入凭据以登录我的工作Office365帐户或单独的outlook.com帐户时,我在调试输出中收到以下错误,Refusedtoexecutescriptfrom'https://directory.services.live.com***'becauseitsMIMEtype('application/json')is

c# - 如何从 Xamarin.Forms 使用 Azure 移动服务?

我尝试通过我的简单表单应用程序使用Azure移动服务,但它不起作用。最后一个命令永远运行。我用WebClient检查了互联网连接,没问题。该代码在简单的Windows控制台应用程序中运行良好。varms=newMobileServiceClient(@"https://xxx.azure-mobile.net/",@"xxx");IMobileServiceTabletodoTable=ms.GetTable();Listitems=todoTable.Where(todoItem=>todoItem.Complete==false).ToListAsync().Result;编辑:我

c# - Xamarin 表单单元测试

为XamarinForms应用程序编写单元测试的方法是什么(相对于XamarinTraditional,即Xamarin.Android、Xamarin.IOS或Xamarin.UWP)?谁能很好地解释Xamarin.Forms中的单元测试与XamarinTraditional中的单元测试?关于如何实现Xamarin.Forms测试的很好的解释文章,是否需要它们,或者我们是否应该为每个平台编写单元测试?我已经阅读了很多文章,但还没有找到一篇从在VisualStudio中创建单元测试项目类型到编写和运行测试的文章。他们大多从中间的某个地方开始讨论DI或ServiceLocator(就像这

c# - 我在哪里可以在 xamarin 应用程序中添加 google-services.json

您好,我们正在开发Xamarin应用程序,我们希望通过我们的推荐ID监控有多少人安装了应用程序。我找到了这份文件https://developers.google.com/analytics/devguides/collection/android/v4/其中显示“将刚刚下载的google-services.json文件复制到AndroidStudio项目的app/或mobile/目录中。”。我有visualstudio(2013)项目,其中当然缺少这些文件夹。问题是,我在visualstudio项目中的什么地方添加了google-services.json文件?提前致谢

c# - 加载程序集 Xamarin.Android.Support.v4 时出现异常

我正在使用Xamarin.Forms开发visualstudio,我收到以下错误:Exceptionwhileloadingassemblies:System.IO.FileNotFoundException:Couldnotloadassembly'Xamarin.Android.Support.v4,Version=1.0.0.0,Culture=neutral,PublicKeyToken='.Perhapsitdoesn'texistintheMonoforAndroidprofile?Filename:'Xamarin.Android.Support.v4.dll'atXam

c# - xamarin.forms 从 xaml 绑定(bind)到属性

我是xaml绑定(bind)的新手,有时我真的不明白。我的xaml中有这个:绑定(bind)“IsLoading”。我在哪里声明/设置这个属性?!我的.cs看起来像这样:....publicboolIsLoading;publicCardsListXaml(){InitializeComponent();IsLoading=true;.... 最佳答案 绑定(bind)通常从BindingContext属性解析(在其他实现中,此属性称为DataContext)。默认情况下为null(至少在XAML的其他实现中),因此您的View无法

c# - 可移植类库不支持System.IO,为什么?

我创建了一个可移植类库,用于我的Monodroid项目。但问题是我需要System.IO库,但不幸的是我无法添加它。我什至尝试通过“添加引用”选项添加它,但没有成功。为什么会这样?我该怎么做? 最佳答案 您不能使用System.IO,因为它不是可移植类库。System.IO进行特定于其运行的操作系统(Windows)的调用,而可移植类库是跨平台的。可以找到您正在寻找的解决方案here:Whatshouldyoudowhenyou’retryingtowriteaportablelibrarybutyouneedsomefunctio