Last active
December 10, 2015 12:28
This file contains 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 characters
using System.Windows.Input; | |
using Cirrious.MvvmCross.Commands; | |
using Cirrious.MvvmCross.Platform.Diagnostics; | |
namespace Casino.Core.ViewModels | |
{ | |
public class HomeViewModel : BaseViewModel | |
{ | |
public void Init() | |
{ | |
MvxTrace.Trace("Initialising 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 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 characters
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 Init(NavigationParameters parameters) | |
{ | |
MvxTrace.Trace("Initialising SubViewModel ... with parameters {0} and {1}", parameters.Test1, parameters.Test2); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment