Last active
December 10, 2015 12:28
Revisions
-
slodge revised this gist
Jan 2, 2013 . 2 changed files with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,9 +6,9 @@ namespace Casino.Core.ViewModels { public class HomeViewModel : BaseViewModel { public void Init() { MvxTrace.Trace("Initialising HomeViewModel ... with no parameters"); } public ICommand GoCommand This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,9 +15,9 @@ public SubViewModel() MvxTrace.Trace("Constructing..."); } public void Init(NavigationParameters parameters) { MvxTrace.Trace("Initialising SubViewModel ... with parameters {0} and {1}", parameters.Test1, parameters.Test2); } } } -
slodge created this gist
Jan 2, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ using System.Windows.Input; using Cirrious.MvvmCross.Commands; using Cirrious.MvvmCross.Platform.Diagnostics; namespace Casino.Core.ViewModels { public class HomeViewModel : BaseViewModel { public void NavigateTo() { MvxTrace.Trace("Navigating to HomeViewModel ... with no parameters"); } public ICommand GoCommand { get { return new MvxRelayCommand(() => this.RequestNavigate<SubViewModel>(new SubViewModel.NavigationParameters() { Test1 = "Testing 1", Test2 = 99 })); } } } } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ using Cirrious.MvvmCross.Platform.Diagnostics; namespace Casino.Core.ViewModels { public class SubViewModel : BaseViewModel { public class NavigationParameters : NavigationParametersBase { public string Test1 { get; set; } public int Test2 { get; set; } } public SubViewModel() { MvxTrace.Trace("Constructing..."); } public void NavigateTo(NavigationParameters parameters) { MvxTrace.Trace("Navigating to SubViewModel ... with parameters {0} and {1}", parameters.Test1, parameters.Test2); } } }