mvvmcross

SideMenu for mvvmCross

余生颓废 提交于 2019-12-24 20:13:23
问题 Tying to implement side menu for Xamarin.iOS app, but got warning in console: mvx:Warning: 0.25 No sidemenu found. To use a sidemenu decorate the viewcontroller class with the 'MvxPanelPresentationAttribute' class and set the panel to 'Left' or 'Right'. Steps 1) Create base class for menu (from sample) public class BaseMenuViewController<T> : MvxViewController<T>, IMvxSidebarMenu where T : class, IMvxViewModel { public virtual UIImage MenuButtonImage => UIImage.FromBundle("burger"); public

Capture selected RadioButton from the RadioGroup

我怕爱的太早我们不能终老 提交于 2019-12-24 16:40:53
问题 I have radiobutton group , which has two radiobuttons as follows. I could able to see both of them. I have used the same approach from the following sample code https://github.com/MvvmCross/MvvmCross-Tutorials/blob/master/ApiExamples/ApiExamples.Core/ViewModels/ViewModels.cs When I debug the code in order to see which radio button is selected, I put a debug point in the SelectedItem but when I change radio button it does hit neither set or get in the SelectedItem . How do I capture which

MvvmCross vnext: monodroid binding Dictionary Key similar to wp7

瘦欲@ 提交于 2019-12-24 15:50:33
问题 When I change MainMenuViewModel in Tutorial.Core to use a Dictionary like this: `public Dictionary Items { get; set; } public ICommand ShowItemCommand { get { return new MvxRelayCommand>((type) => DoShowItem(type.Value)); } } public void DoShowItem(Type itemType) { this.RequestNavigate(itemType); } public MainMenuViewModel() { Items = new Dictionary<string, Type>() { {"SimpleTextProperty", typeof(Lessons.SimpleTextPropertyViewModel)}, {"PullToRefresh", typeof(Lessons.PullToRefreshViewModel)},

MvvmCross with two core libraries

倾然丶 夕夏残阳落幕 提交于 2019-12-24 15:27:46
问题 Is it possible to link two Core libraries into your app? I would like to create one Common.Core library that has login and account view models. I would like another one Domain.Core library that has some domain view models in it. These could be used across a couple different projects. In my app, I do a new Setup().Initialize(). My Setup class overrides CreateApp() ... public class Setup : MvxPhoneSetup { protected override IMvxApplication CreateApp() { CreatableTypes().EndingWith("Service")

Using a iOS UITabBar with MVVMCross MvxViewController not MvxTabBarViewController

岁酱吖の 提交于 2019-12-24 15:07:15
问题 We have a 4 views that are considered siblings in the UX design and so we would like to display them on a TabBar in iOS. We already have them in a NavigationDrawer in Android. Lets call them Customer CustomerOrders CustomerHistory Returns These are represented by 4 separate ViewModels. Looking at the MvxTabBarViewController samples I have to created a Uber ViewModel that exposes all 4 ViewModels as properties. Then attach the 4 views (MvxViewControllers) to a Parent View (MvxTabViewController

Xamarin IDE and visualstudio for windows +Mvvmcross

↘锁芯ラ 提交于 2019-12-24 13:58:13
问题 I have some confusions About the IDE to use for MvvmCross a) VisualStudio (VS) uses Xamrarin.iOS and Xamarin.Android plugin for iOS and Android development. But can we also use PCL(Portable Class libraries) and MVVMCross/Monocross frameworks in VS? I see the PCL option on VS but, i don't see the support for Android & iOS. Do i need to install additional plugin for PCL to support these two platforms as well? b) Xamarin IDE supports Android and iOS development on Mac but, is it true that

mvvmcross IOS: How to callback from a ViewModel to a View

有些话、适合烂在心里 提交于 2019-12-24 12:58:03
问题 I have a MvxViewController and in the ViewDidLoad i bind the button click to the viewmodel. When the button is clicked I open another view in which I will need to return a string back to my first view public override void ViewDidLoad () { var set = this.CreateBindingSet<MyView1, MyView1ViewModel>(); set.Bind(myButton).To(vm => vm.MyButtonCommand); set.Apply(); } public ICommand MyButtonCommand { get { _myButtonCommand = _myButtonCommand ?? new MvxCommand(MyButtonCommandClick); return

How to control child view model from parent view model in xamarin mvvmCross?

爱⌒轻易说出口 提交于 2019-12-24 12:14:42
问题 I have a parent view model. Let's call it ParentViewModel . In ParentView.axml I have this MvxListView code: <Mvx.MvxListView android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:elevation="0dp" android:padding="5dp" local:MvxItemTemplate="@layout/childlistitem" local:MvxBind="ItemsSource Items" /> So it is obvious that I have ChildListItemViewModel as well... Now each Item has some parameters inside such as "Id, name,...." besides that my each

Integrating Google Mobile Analytics with MVVMCross

眉间皱痕 提交于 2019-12-24 10:49:00
问题 The new Google Analytics SDK introduces a new subclass to UIViewController from which you have to inherit: GAITrackedViewController . More info here: https://developers.google.com/analytics/devguides/collection/ios/v2/screens This obviously clashes with MvxBindingTouchViewController , as you can only inherit from one class in C#. What's the recommended way in getting this working? 回答1: MvvmCross's MvxTouchViewController's is special... MvvmCross's MvxBindingTouchViewController is even more

How to implement Close button in MVVMCross WPF application?

試著忘記壹切 提交于 2019-12-24 10:46:19
问题 I am using MVVMCross in my WPF application, and I want to provide a Close (or Exit ) button in the GUI to shut-down the entire application. Is there a straightforward way to do this using MVVMCross functionality? I have tried the following approach with my MainViewModel : public class MainViewModel : MvxViewModel { private MvxCommand _closeCommand; public MvxCommand CloseCommand { get { return _closeCommand ?? (_closeCommand = new MvxCommand(DoClose)); } } public void DoClose() { Close(this);