问题标签 [xamarin.forms]
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.
c# - 是否可以将 Xaml 设计器或智能感知与 Xamarin.Forms 一起使用?
Xamarin 3.0 引入了Xamarin.Forms,这是一种强大的 UI 抽象,允许开发人员轻松创建可在 Android、iOS 和 Windows Phone 之间共享的用户界面。
它看起来非常强大,但我在创建 UI 时遇到了一些困难,因为 Xamarin.Forms 带有 40 多个控件。如果没有智能感知或极简设计师,在官方文档中搜索所有属性或通过浏览 c# 代码会适得其反。
默认的 Xaml teamplate 是这样的,在没有任何帮助的情况下添加新控件显然不是一件容易的事。
那么有没有机会在 Xaml 中拥有智能感知或使用 Xaml 设计器?
xamarin.android - 在 Xamarin.Forms 内容页面中使用日期选择器控件时出现未处理的 WindowManagerBadTokenException
我想使用 Xamarin.Forms 创建一个应用程序。我创建了一个内容页面并在其上添加了 DatePicker 控件。
第一次启动活动时,日期选择器工作得很好......但是,当我们通过移动后退按钮关闭应用程序并重新启动应用程序时,它会在打开日期选择器时抛出一个未处理的异常,说这个异常:
xamarin.ios - mvvmcross 与 Xamarin.Forms
我使用 mvvmcross 为 iOS 和 Android 开发了一个基于 Xamarin 的应用程序。2 周前 Xamarin 宣布 Xamarin.Forms。有人成功地将带有 mvvmcross 的 Xamarin 移植到带有 mvvmcross 的 Camarin.Forms 吗?我想重用我的大部分代码,我正在使用:Messenger、Location、SQLite 等。
如果有人可以提供带有一些 Xamarin.Forms 和 mvvmcross 集成的示例 .sln,那就太好了。我认为 mvvmcross 的开发人员正在努力发布另一个关于这个问题的视频(#43?),但我不确定。
xamarin - 指示表单为 Android Theme.Holo.Light 使用其他颜色
由于我不喜欢 Xamarin 的 Android 目标的深色主题,因此我使用以下代码切换到全息光Manifest.xml
:
虽然Button 和 Label 显示正确的颜色,但像这样创建的菜单不会:
菜单 TableView 以浅灰色背景上的白色文本显示。非常难读。
我可以指示 Xamarin.Forms 一致地切换颜色吗?
xamarin - 如何使用 Xamarin.Forms 等待模态表单解除?
使用 Xamarin.Forms 如何使用 make 一个等待表单关闭的异步方法?如果我使用
它会在动画完成后返回,而不是在页面关闭时返回。
我想要一个创建模式任务 SignInAsync 方法,如果登录成功则返回 true。
xamarin.ios - 在表单中查看包含 ContainerView / Fragment 支持
Xamarin.Forms 中有没有办法处理视图包含?假设我想用一个容器构建一个垂直的 TabBar。通常在 iOS 中我会使用容器视图,而在 Android 中我会使用 Fragments。我将如何在 Xamarin.Forms 中执行此操作?
mvvm - 查看 Xamarin.Forms 中的绑定错误
我不时遇到问题,在 iOS 上使用 Xamarin.Forms 的 View -> ViewModel 绑定错误。
例如,我在 ViewModel 中有一个从标签到双属性的绑定,直到我添加了这样的字符串格式之前什么都没有发生:
如果框架告诉我有错误,那会容易得多。
这是我的问题:我在哪里可以看到 Xamarin.Forms 中的绑定异常/警告?
xaml - Databinding in XAML for MasterDetailPage in Xamarin.Forms
So far, most examples using Xamarin.Forms are using C# for building up the UI. I prefer using XAML for the UI, and databind it to ViewModels.
I'm having trouble using the Xamarin.Forms.MasterDetailPage in combination with XAML, and I can't seem to port the C# example to XAML + ViewModels.
This is the XAML I got so far:
The component works: I do see the 'Master' and 'Detail' labels. The bound labels (on the BindingContext objects) are not displayed.
I've used loads of different combinations, but I'm still stuck: How does this work? Is my binding incorrect (should it be on the "ContentPage"), can't I bind to the .Master and .Detail properties etc.? How should the "Menu" and "Detailpage" bindings look like?
It would be a huge help if anyone could help me out! The next step would be that the .Detail will be changed when a button is pressed in the .Master . Thanks in advance!
c# - 在 Xamarin.Forms 中编写设备平台特定代码
我有以下Xamarin.Forms.ContentPage
类结构
我想在MyPage
LogIn
方法中编写特定于平台的代码,以根据他们在哪个设备操作系统上使用我的应用程序来保存访问令牌。
当用户在他们的设备上使用我的应用程序时,我如何只运行设备特定的代码?