mvvmcross

What is the best way to pass objects to “navigated to” viewmodel in MVVMCross?

ⅰ亾dé卋堺 提交于 2019-12-17 18:53:26
问题 I've a ViewModel which contains a Team which has a Players property which is a list of Player objects. Within TeamView the Team is deep loaded, so player data is already in the memory. What is the best way to pass a given selected Player class instance to a PlayerView? The problem is that MVVMCross ViewModel constructors can only contain string properties in current version. I've the following ideas: Pass the Id of the selected Player and assign the Team.Players property as a ViewModel to the

MvxListView create binding for template layout from code

放肆的年华 提交于 2019-12-17 16:08:22
问题 Lets say I have a simple Layout with a MvxListView: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:local="http://schemas.android.com/apk/res/LiivControl.Client.Droid" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <Mvx.MvxListView android:layout_width="fill_parent" android:layout_height="wrap_content" local:MvxBind="ItemsSource AutoListItems; ItemClick

MVVMCross changing ViewModel within a MvxBindableListView

眉间皱痕 提交于 2019-12-17 06:54:46
问题 Little problem with my Android application and I don't know how to solve it with MVVM Cross. Here is my Model public class Article { string Label{ get; set; } string Remark { get; set; } } My ViewModel public class ArticleViewModel: MvxViewModel { public List<Article> Articles; .... } My layout.axml ... <LinearLayout android:layout_width="0dip" android:layout_weight="6" android:layout_height="fill_parent" android:orientation="vertical" android:id="@+id/layoutArticleList"> <EditText android

MVVMCross changing ViewModel within a MvxBindableListView

丶灬走出姿态 提交于 2019-12-17 06:53:17
问题 Little problem with my Android application and I don't know how to solve it with MVVM Cross. Here is my Model public class Article { string Label{ get; set; } string Remark { get; set; } } My ViewModel public class ArticleViewModel: MvxViewModel { public List<Article> Articles; .... } My layout.axml ... <LinearLayout android:layout_width="0dip" android:layout_weight="6" android:layout_height="fill_parent" android:orientation="vertical" android:id="@+id/layoutArticleList"> <EditText android

Xamarin Android ScrollView doesnt work in ListView

不打扰是莪最后的温柔 提交于 2019-12-13 21:49:37
问题 I have a problem with ListView where I need have scroll view when I have there so much items, but ScrollView which implements ListView doesnt work... I dont know why... Can someone help me? I have on half of screen OxyPlot view and under I have on another half screen my ListView where I need scrolling where are there so much items..... Here is screen how looks my view: Here is my code: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res

MvvmCross Popup Window

穿精又带淫゛_ 提交于 2019-12-13 21:14:11
问题 I would like to have a popup window. Even though I am using MvvmCross, it will strictly run on Android. In Windows Store, you can do the following with xaml: <Popup VerticalOffset="300" HorizontalOffset="200" x:Name="SigPopup" > <Border BorderBrush="{StaticResource ApplicationForegroundThemeBrush}" Background="{StaticResource ApplicationPageBackgroundThemeBrush}" BorderThickness="1"> <StackPanel> <StackPanel Orientation="Horizontal" > <Button x:Name="btnAccept" Content="Accept" Click=

MvvmCross remove back stack windows app

一笑奈何 提交于 2019-12-13 19:50:45
问题 How can I clear the back stack in windows apps (not windows phone)? I am using MvvmCross v3. Where is the most correct place to put it? I have read this post http://edsnider.net/2014/04/07/clearing-windows-phone-nav-back-stack-in-mvvmcross/ where he is using CustomWP8ViewPresenter public override void ChangePresentation(MvxPresentationHint hint) { if (hint is ClearNavBackStackHint) { while (RootFrame.BackStack.Any()) { RootFrame.RemoveBackEntry(); } } base.ChangePresentation(hint); } My

MvxSidebarPresentationAttribute is not configured in the presenter dictionary

微笑、不失礼 提交于 2019-12-13 16:32:57
问题 Unhandled Exception System.Collections.Generic.KeyNotFoundException : The type MvxSidebarPresentationAttribute is not configured in the presenter dictionary MvvmCros 5.6 Tools Visual studio 2015 Windows 8.1 iPhone 7 simulator iOS 10.3 code Menu View [MvxFromStoryboard("Main")] [MvxSidebarPresentation(MvxPanelEnum.Left, MvxPanelHintType.PushPanel, false)] public partial class MenuViewController : MvxViewController<MenuViewModel> { public MenuViewController(IntPtr handle) : base(handle) { }

MvvmCross flood of messages: “Weak Target is null in … - skipping set”

孤者浪人 提交于 2019-12-13 14:55:17
问题 I'm working with a team to create an android application using MvvmCross. Recently we've started seeing a flood of repeating warning/error messages that look something like this: MvxBind:Warning:207.06 Weak Target is null in MvxWithEventPropertyInfoTargetBinding - skipping set [0:] MvxBind:Warning:207.06 Weak Target is null in MvxWithEventPropertyInfoTargetBinding - skipping set 09-05 17:56:25.076 I/MvxBind (20932): 207.06 Weak Target is null in MvxWithEventPropertyInfoTargetBinding -

Error installing MVVMCross from nuget into a PCL

て烟熏妆下的殇ゞ 提交于 2019-12-13 14:25:48
问题 When I try to install MvvmCross into a new PCL I receive an error. The console log is below: Package Manager Console Host Version 2.5.40416.9020 Type 'get-help NuGet' to see all available NuGet commands. PM> install-package MvvmCross Attempting to resolve dependency 'MvvmCross.HotTuna.StarterPack (≥ 3.0.6)'. Attempting to resolve dependency 'MvvmCross.HotTuna.CrossCore (≥ 3.0.6)'. ``Attempting to resolve dependency 'MvvmCross.PortableSupport (≥ 3.0.6)'. Installing 'MvvmCross.PortableSupport 3