jjzjj

MvvmCross

全部标签

ios - Mvvm交叉/Xamarin "This class is not key value coding-compliant for the key"

这个问题在这里已经有了答案:Xcode-Howtofix'NSUnknownKeyException',reason:…thisclassisnotkeyvaluecoding-compliantforthekeyX"error?(78个答案)关闭6年前。我知道这个问题已被问过一百万次,但我在尝试遵循StuartLodge的教程“MvvmCross的N+1天”,N=11,CollectionView时遇到了错误。我并没有100%跟进,因为我在观看教程时有另一个项目正在编辑,所以我确定我错过了一些东西。这是完整的错误消息:Foundation.MonoTouchException:Obj

android - 进入应用前台调用特定代码

我正在尝试将以下代码从xamarin.iOS移植到xamarin.android:publicHomeView():base(nameof(HomeView),null){NSNotificationCenter.DefaultCenter.AddObserver(UIApplication.WillEnterForegroundNotification,(NSNotificationnot)=>{if(NavigationController.TopViewControllerisHomeView)ScrollToCurrentDay();});DispatchQueue.MainQ

c# - MvvmCross - 如何添加自定义模式转换

我正在使用MvvmCross和Xamarin开发一个项目。我正在尝试在呈现和关闭模态视图时添加自定义转换。目前我是这样呈现的:[MvxModalPresentation(WrapInNavigationController=true,ModalPresentationStyle=UIModalPresentationStyle.Custom)]publicpartialclassMyView:MvxViewController{并以这种方式解雇它:NavigationController.DismissModalViewController(true);所以我已经准备好我的动画,但我假

ios - 如何使用 MVVM 在 MonoTouch TableView 中绑定(bind)删除按钮

我需要将出现在Monotouch的TableView中的删除按钮绑定(bind)到我的ViewModel中的命令吗? 最佳答案 一种方法是更改​​您的MyItemType(在ViewModel的集合中使用),使其具有PleaseDeleteMeCommand,然后将其命名为:publicoverridevoidCommitEditingStyle(UITableViewtableView,UITableViewCellEditingStyleeditingStyle,NSIndexPathindexPath){if(editingS

ios - MVVM跨iOS : how to bind a command with Custom transition when switching to different View model

对于MVVMCrossios,如何使用不同的TransitionalStyle(例如FlipHorizo​​ntal样式)而不是使用“ShowViewModel”的默认滑动效果?[Register("SearchResults")]publicclassSearchResultsView:MvxTableViewController{publicoverridevoidViewDidLoad(){Title="List";base.ViewDidLoad();varmapButton=newUIButton(newRectangleF(0,0,65,30));mapButton.Set

ios - Mvvm 跨 iOS : How to bind MapView Annotation to jump to another view?

单击标注附件按钮时,如何绑定(bind)MapView的注释以切换到不同的View?如何实现注解的CalloutAccessoryControlTapped方法?或者最好的方法是什么?这是我的代码:[Register("MapView")]publicclassMapView:MvxViewController{publicoverridevoidViewDidLoad(){Title="Map";base.ViewDidLoad();varmapView=newMKMapView(newRectangleF(0,0,320,UIScreen.MainScreen.Bounds.Hei

ios - 如何绑定(bind) NSAttributeString(或 NSMutableAttributedString)

我想使用MVVMCross将属性字符串绑定(bind)到UILabel。要绑定(bind)一个常规字符串,我会这样做:set.Bind(MyLabel).To(vm=>vm.MyString);但我需要一个字符串,其中部分文本将使用一种颜色和一种字体大小,而另一部分将使用不同的颜色和不同的字体大小。如果这是静态的,没问题,我会在界面生成器中添加一个标签并将其设置为“属性”,然后在我需要的字符串的任何部分上设置我想要的任何字体选项。所以我想到使用Mvvmcross,我可能需要一个转换器来将我的源字符串转换为属性字符串,所以我尝试从MvxValueConverter创建一个转换器它只是在其

iOS : Expandable list view not drawing newly added control

我正在尝试使用Xamarin和MvvmCross在iOS中创建一个可扩展的ListView。场景是我有一个ListView,当ListView中的一行被选中时,它展开(动画)以显示一个CollectionView,通过延迟加载加载。这是我目前的代码:适配器:publicclassMercatoAnimatedExpandableTableSource:MvxTableViewSource{privatereadonlystring_key;privatereadonlyListitems;privateDictionaryexpandableState=newDictionary();

ios - MvxViewModelRequest 在 ViewDidLoad 中为 null

我在iPad项目中使用MvvmCross3.0.12。目前,我在MvxViewControllerExtensionMethods.LoadViewModel中得到一个NPE,因为touchView.Request为空。这只发生在继承自MvxTableViewController的ViewController中;从MvxViewController继承的ViewController加载和显示都很好。我在MvxTouchViewsContainer.CreateView->MyTableViewController.Ctor->MvxBaseTouchViewPresenter.Show

c# - MVVMCross,FieldBinding 插件,iOS,代码绑定(bind)不起作用

我在我的iOS应用程序中使用MVVMCross/Xamarin。我的ViewModel的属性定义如下:publicreadonlyINCEntity=newNC();在哪里publicclassAddress{publicstringLine1{get;set;}publicstringLine2{get;set;}publicstringLine3{get;set;}//otherproperties...}如果我以这种方式绑定(bind),它会起作用:set.Bind(Line1Text).To("Entity.Line1").TwoWay();如果我以这种方式进行绑定(bind)