Tag: xamarin

完成button不被触发在Xamarin Entry上完成的事件

在Xamarin Forms的iOS数字键盘上添加完成button之后,我遇到了另一个问题:完成button没有激发Completed事件(就像返回button一样)。 在我实现这个的方式,我发现Xamarin论坛上的以下代码: using System; using System.Drawing; using System.Reflection; using Xamarin.Forms.Platform.iOS; using Xamarin.Forms; using UIKit; using KeyboardTest.iOS; using KeyboardTest; [assembly: ExportRenderer(typeof(EntryDone), typeof(EntryDoneRenderer))] namespace KeyboardTest.iOS { public class EntryDoneRenderer : EntryRenderer { // used to cache the MethodInfo so we only have the reflection hit once private MethodInfo baseEntrySendCompleted = null; public EntryDoneRenderer () { } […]

Chromecast ios:streamhtml内容

我开始开发我自己的应用程序,以stream媒体HTML网站的铬播放。 在文档中说,谷歌安装了一个默认的应用程序,用于显示像HTML,video,图像等内容。我试了一下,video和图像工作正常(url结尾=“.mp3”或“.mkv”)。 但是,当我试图stream式传输一个网站(url结尾=“。html)它不会stream任何东西。 我正在做一个mediachannel和mediaInfo。 var mediaInfo = new GCKMediaInformation (url, GCKMediaStreamType.None, "unkown", metadata, 0, null); 在此先感谢亚历克斯

在Xamarin.iOS中创build一个Qt视图

我试图在Xamarin.iOS项目中使用基于Qt的库 。 作为第一步,我想 初始化一个简单的Qt视图和 把它放在一个空的ViewController中。 我已经设法将iOS项目与QtCore和QtGui链接起来。 现在我正努力用相应的C#调用来绑定Qt的C ++方法。 有没有人与Xamarin 和 Qt的组合? 这是否是要走的路? (我能在网上find的关于Xamarin 与 Qt …)

在Xamarin ios中以不同的样式(List,Grid,Blocks)显示项目?

我是新来的xamarin ios。 我想在视图控制器中以不同的样式(列表,网格,块)显示项目。 我尝试与表格视图单元格,但我无法使其正确。 请find下面的图片。 当我们点击图标(列表图标,网格图标,块图标)时,我们需要在同一视图控制器中显示不同的样式视图。 请告诉我如何使它成为可能。 提前致谢。

无法绑定到mvvmcross中的ios表节单元格,子单元格按预期方式绑定

我试图创build一个TableView分组部分如下所示: 我绑定了一个表的列表。 一个组包含一些string属性和一个项目列表,而一个项目也包含一些string属性。 组和项目单元每个都有自己的类,它扩展了MvxTableViewCell 。 在每个单元格的内部,我绑定如下: 项目单元格: this.DelayBind(() => { var set = this.CreateBindingSet<ItemCellView, ItemCellViewModel>(); set.Bind(lblOne).To(item=> item.propertyOne); set.Apply(); }); 和集体单元: this.DelayBind(() => { var set = this.CreateBindingSet<GroupCellView, GroupCellViewModel>(); set.Bind(lblOne).To(group=> group.propertyOne); set.Apply(); }); 我在主视图中的MvxStandardTableViewSource扩展MvxStandardTableViewSource并使用重写的方法来获取表的各个单元格。 public override UIView GetViewForHeader返回一个组单元格视图,而protected override UITableViewCell GetOrCreateCellFor返回一个项目单元视图。 我的问题是,组视图单元格不绑定什么,而项目视图单元格绑定就好,即使我没有看到两者之间的明显差异。 组视图单元格正在构build,但是这只是没有发生在单元格内的绑定。 编辑:添加表视图源: private class TableSource : MvxStandardTableViewSource { private List<GroupCellViewModel> _groups; public new List<GroupCellViewModel> […]

调用iOS Alert时出现UI一致性错误

我有一个iOS Xamarin项目,我收到以下错误: UIKit Consistency error: you are calling a UIKit method that can only be invoked from the UI thread. 以下代码会发生此错误: 在我的欢迎视图页面中,我有一个名为SyncButton的button被点击。 该button的点击应该使用REST将数据与服务器进行同步。 在我的WelcomeController中我有: …. SyncButton.TouchUpInside += async (object sender, EventArgs e) => { SyncButton.Enabled = false; await welcomeDelegate.syncButtonCore (cred, iOSErrorAlert); SyncButton.Enabled = true; }; …. public void iOSErrorAlert(string LoginErrorTitle, string LoginErrorMessage){ var Alert = […]

是否有像XCode的MonoTouch的OpenGL帧捕获?

自XCode 4.2以来,XCode的“帧捕获”function就在这里。 在MonoTouch中是否有类似的function,或者是否可以在MonoTouch项目中利用XCode的function? @ Xamarin人:如果没有,是否有任何计划来支持这样的事情?

Xamarin.iOS中的自定义SQLite函数

我正在Xamarin.iOS上处理Sqlite的自定义函数。 我从这里得到的答案: 在给定的半径(Xamarin.Android)在地图上显示标记,但我遇到了问题 尝试使用–aot-only运行时JIT编译方法'(包装本机到托pipe)Mono.Data.Sqlite.SqliteFunction:ScalarCallback(intptr,int,intptr)'。 在栈上search后,我发现这里是一个解决scheme: 自定义函数SQLite与单声道,但解决scheme提到有我很难理解。 我不知道如何使用MonoPInvokeCallbackAttribute注释方法,并将其设置为静态,因为SqliteFunction类中的方法被覆盖,所以不能使其为静态。 如果有人能够帮助我理解该解决scheme或提供解决scheme中缺less的步骤,那将是非常好的。

Xamarin.Forms iOS UIKit.UIImage错误

我一直在使用Xamarin.Forms制作移动应用程序。 我有一切工作在Android上,但是当我尝试在iOS上启动时,我得到的错误: System.Exception: Could not initialize an instance of the type 'UIKit.UIImage': the native 'initWithContentsOfFile:' method returned nil. >It is possible to ignore this condition by setting MonoTouch.ObjCRuntime.Class.ThrowOnInitFailure to false. …. 有谁知道如何解决这个问题? 编辑:这是它给我的错误的代码,但我有感觉别的是导致它: using System; using System.Collections.Generic; using System.Linq; using Foundation; using UIKit; namespace CloudClubv1._2_.iOS { public class Application { // This is the main […]

如何在iOS ViewCellRenderer中更改窗体ViewList的MenuItem颜色?

有没有办法改变Xamarin.Forms Xaml文件中添加的ContextAction菜单的颜色。 IsDestructive="True"将菜单颜色设置为红色。 但我需要另一个菜单看起来像绿色或其他颜色。 这是我的Forms Xaml代码 <ListView x:Name="planList" ItemsSource="{x:Static local:SampleData.PLAN_DATA}" RowHeight="150" HorizontalOptions="FillAndExpand"> <ListView.ItemTemplate> <DataTemplate> <ViewCell> <ViewCell.ContextActions> <MenuItem Clicked="OnEditClick" Text="Edit" CommandParameter="{Binding .}"/> <!– THIS HAS TO BE GREEN COLOR –> <MenuItem Clicked="OnDeleteClick" Text="Delete" IsDestructive="True" /> </ViewCell.ContextActions> <ViewCell.View> <StackLayout Orientation="Vertical" HorizontalOptions="Start" VerticalOptions="FillAndExpand"> <!–Non Editable State–> <StackLayout Orientation="Horizontal" Spacing="28" IsVisible="{Binding isNotSaveState}"> <Frame WidthRequest="130" HeightRequest="50" BackgroundColor="#151617" HorizontalOptions="Start"> <Label Text="{Binding […]