mvvmcross

why does MvxModalSupportTouchViewPresenter in MvvmCross only support one modal view

我们两清 提交于 2019-12-24 08:48:45
问题 I have an application that needs a model view on top of a modal view but the presenter MvxModalSupportTouchViewPresenter doesn't support it. Is there any reason for this before I set out on extending it? 回答1: The default mvx presenters are there to provide basic presentation. If you need custom functionality then please do create your own presenter logic. See the conference sample for an example - ir reroutes navigation through a tab controller. I anticipate that many phone and especially

Loading a .xib using MvvmCross and Xamarin

人走茶凉 提交于 2019-12-24 08:46:41
问题 I'm taring my hair out at the moment. I've been trying to get a very simple view to load from a plugin but keep getting varying errors. The last attempt I did gives me the following error: 'Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: -[UIViewController _loadViewFromNibNamed:bundle:] loaded the "PincodeView" nib but the view outlet was not set.' Here's the .xib: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type

How to navigate to a ViewModel that extends an abstract class?

无人久伴 提交于 2019-12-24 07:35:10
问题 I am trying to share viewmodels as much as possible using MVVMCross's suggested assembly architecture: MyApp.App └ ViewModels ├ GlobalViewModel1 └ GlobalViewModel2 (abstract) MyApp.Droid ├ Views │ ├ View1 │ └ View2 └ ViewModels └ ChildOfGlobalViewModel2 MyApp.Store ├ Views │ ├ View1 │ └ View2 └ ViewModels └ ChildOfGlobalViewModel2 I can correctly navigate to View1 and its associated viewmodel GlobalViewModel1 , but it gets more complicated when I want to navigate to View2 because its

Sharing images across projects in Xamarin

五迷三道 提交于 2019-12-24 06:36:03
问题 I'd like to use the same images in multiple device apps in Xamarin. I have a PCL core library and have started using MVVMCross. What's the best approach to accomplish this? Can I embed them as a resource in the Core library and access it in my Andriod/iOs project, or is it better to use add as link? 回答1: You can in theory embed these as binary resources in the PCL project and can then access them as byte[] via GetResourceStream and from there can then get them decoded in your UI projects.

On Android device UI update happens only after user interaction

做~自己de王妃 提交于 2019-12-24 06:08:08
问题 Interesting (at least for me) bug I found there. I am making an (prototype) app, it does some web requests and returns simple data. There is ObservableCollection<DownloadbleEntity> which is updated dynamicly (because DownloadbleEntity contains the image which we get by other requests, to output list element with an image). Here is layout part: <MvvmCross.Binding.Droid.Views.MvxListView android:id="@+id/searchlist" android:layout_width="fill_parent" android:layout_height="fill_parent" android

On Android device UI update happens only after user interaction

早过忘川 提交于 2019-12-24 06:08:02
问题 Interesting (at least for me) bug I found there. I am making an (prototype) app, it does some web requests and returns simple data. There is ObservableCollection<DownloadbleEntity> which is updated dynamicly (because DownloadbleEntity contains the image which we get by other requests, to output list element with an image). Here is layout part: <MvvmCross.Binding.Droid.Views.MvxListView android:id="@+id/searchlist" android:layout_width="fill_parent" android:layout_height="fill_parent" android

How to bind arrays i mvvmcross

≡放荡痞女 提交于 2019-12-24 06:03:21
问题 I need a button to move in the view, when it is clicked. I have bind the the button in the following way (Android) set.Bind(_paramsButton).For(pb => pb.LeftMargin).To(vm => vm.ButtonX).OneWay(); set.Bind(_paramsButton).For(pb => pb.TopMargin).To(vm => vm.ButtonY).OneWay(); set.Bind(_paramsButton).For(pb => pb.Height).To(vm => vm.ButtonHight).OneWay(); set.Bind(_paramsButton).For(pb => pb.Width).To(vm => vm.ButtonWidth).OneWay(); In the viewModel i have the 'normal' properties private int

Bind data of custom object to TextView in MvvmCross

徘徊边缘 提交于 2019-12-24 03:00:42
问题 I have one custom object in my ViewModel.I want to bind only one of its member to textview in my droid view. I want to bind only string member of that object to textview Currently I am doing this. local:MvxBind = "Text Myobject.ItsMember" Is it ok? Or am I wrong? Or Can I do Like this? local:MvxBind = "ItemsSource MyObject ; Text ItsMember" How can I achieve this? 回答1: local:MvxBind = "Text MyObject.ItsMember" is perfectly fine. Just make sure your spelling and capitalization are correct.

MvxSpinner selecteditem not updated on itemssource change

和自甴很熟 提交于 2019-12-24 02:37:25
问题 I am building a form that involves adding items from a list, but the list that is being shown to the user depends on the selection from another list. To do this I have two MvxSpinners each with a bound ItemsSource and SelectedItem. <MvxSpinner android:layout_width="300dp" android:layout_height="50dp" local:MvxBind="ItemsSource item_source_one; SelectedItem selected_item_one;"/> <MvxSpinner android:layout_width="300dp" android:layout_height="50dp" local:MvxBind="ItemsSource item_source_two;

MvvmCross Hamburger menu for iOS

我的未来我决定 提交于 2019-12-24 02:33:39
问题 I'm using https://www.marcbruins.nl/xamarin-ios-hamburger-menu-mvvmcross/ and it works on Portrait orientation: But on Landscape orientation I have not fill width: Menu class: [MvxPanelPresentation (MvxPanelEnum.Left, MvxPanelHintType.ResetRoot, false)] public partial class MenuView : MvxViewController<MenuViewModel> { public override void ViewDidLoad () { base.ViewDidLoad (); EdgesForExtendedLayout = UIRectEdge.Right; MenuTableView.Source = new MenuTableViewSource(ViewModel.MenuItems); var