Tag: xamarin.forms

创建Xamarin.Forms跨平台应用程序时,“此项目需要加载Visual Studio更新”错误

当我在Windows 8.1上使用Visual Studio Community 2015 Community创建Xamarin.Forms应用程序时,它会在加载时显示此错误: A problem was encountered creating the sub project ‘App1.WinPhone’. This project requires a Visual Studio update to load. Right-click on the project and choose ‘Download Update’ 我已安装所有可用的更新并尝试新安装的Windows。 注意:我在表单中遇到此错误。 我该如何解决这个错误? 注意:解决方案资源管理器中没有“下载更新”选项。

如何刷新导航上的一个但最后一个ContentPage

通常,使用NavigationStack中的一个弹出当前页面: Navigation.PopAsync( true ); 如何使用Navigation重绘当前页面之前的页面? 背景:当前页面改变了需要在一页但最后一页重新呈现的内容。

Xamarin.Forms.Color到hex值

我有一个Xamarin.Forms.Color,我想将其转换为’hex值’。 到目前为止,我还没有找到解决问题的方法。 我的代码如下: foreach (var cell in Grid.Children) { var pixel = new Pixel { XAttribute = cell.X , YAttribute = cell.Y , // I want to convert the color to a hex value here Color = cell.BackgroundColor }; }

有一个“’Resource.Attribute’不包含’actionBarSize’的定义”错误

试图调试一个空的应用程序并得到“’Resource.Attribute’不包含’actionBarSize’的定义”错误。 我重新安装了android SDK。 public static void UpdateIdValues() { global::Xamarin.Forms.Platform.Android.Resource.Attribute.actionBarSize = global::L1NQ.Droid.Resource.Attribute.actionBarSize; } public partial class Attribute { static Attribute() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Attribute() { } }

如何从xamarin.forms中的Google电子表格中读取数据

我正在寻找一种直接从Google Sheets读取/写入数据的方法。 有没有人知道如何在Xamarin.Forms中做到这一点 ? 请记住,使用Install-Package Google.Apis.Sheets.v4 Package,从Windows Form访问Google sheets表格。 我使用以下链接: https://developers.google.com/sheets/api/quickstart/dotnet

Xamarin中的重叠如何形成?

z-index的概念是什么? 图为没有重叠。 如何设置z-index? 前两个自定义选择框 其余的都是。 图表,数据等 … BoxSelector.xaml(内容视图),可重用的ContentView扩展 #f9f9f9 #e2e2e2

在Xamarin.Forms中绑定自定义视图

我在将Xamarin表单中的自定义视图中的数据绑定到包含页面的视图模型时遇到问题。 我的自定义视图非常简单,一对代表键值对的标签: 后面的代码: public partial class KeyValueView : ContentView { public KeyValueView() { InitializeComponent(); this.VerticalOptions = LayoutOptions.Start; this.BindingContext = this; } public static readonly BindableProperty ValueProperty = BindableProperty.Create(w => w.Value, default(string)); public string Value { get {return (string)GetValue(ValueProperty);} set {SetValue(ValueProperty, value);} } public static readonly BindableProperty KeyProperty = BindableProperty.Create(w => w.Key, default(string)); public string Key […]

如何获取当前位置或移动到Xamarin.Forms.Map中的当前位置

由于Map已经显示了用户位置(使用IsShowingUser),我只想缩放到此位置。 这很容易实现,还是我需要在每个平台上获取位置,因为我找不到任何GeoLocation对象。 只有GeoCoder ……这不是缩放到用户位置的常用用例吗?

在Xamarin Forms visual studio中为Grasient添加渐变背景

我是Xamarin Forms的新手,我为Menu创建了一个ContentPage。 我的背景需要线性渐变色。 但我找不到任何告诉我如何创建背景渐变颜色的链接。 我也希望在按钮背景的颜色位置像android中的选择器。 如果您有任何信息,请给予回复。

无法加载文件或程序集’System.Private.CoreLib …’

我有一个针对.net标准1.4的Xamarin.Forms应用程序。 在具有最低版本14393(和目标16299)的UWP应用程序上,我从Microsoft Store获得以下exception(尽管在我的计算机上它甚至可以从appxbundle文件运行良好): 注意要点: Xamarin.Forms.Forms.Init(e);发生错误Xamarin.Forms.Forms.Init(e); 在OnLaunched 。 错误本身是Could not load file or assembly ‘System.Private.CoreLib…’ 。 System.IO.FileNotFoundException:无法加载文件或程序集’System.Private.CoreLib,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a’或其依赖项之一。 该系统找不到指定的文件。 文件名:System.ModuleHandle.ResolveType的’System.Private.CoreLib,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a’(RuntimeModule模块,Int32 typeToken,IntPtr * typeInstArgs,Int32 typeInstCount,IntPtr * methodInstArgs,Int32 methodInstCount ,ObjectHandleOnStack类型)在System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule模块,Int32 typeToken,RuntimeTypeHandle [] typeInstantiationContext,RuntimeTypeHandle [] methodInstantiationContext)处于System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken,Type [] genericTypeArguments,Type [] genericMethodArguments)at at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord,MetadataImport范围,Assembly&lastAptcaOkAssembly,RuntimeModule decoratedModule,MetadataToken decoratedToken,RuntimeType attributeFilterType,Boolean mustBeInheritable,Object […]