public CreateActivityPage(ActivityModel activityModel) { InitializeComponent(); if (activityModel != null) { Title = "Edit"; } BindingContext = new CreateActivityViewModel(Navigation, activityModel); }
public CreateActivityViewModel(INavigation navigation, ActivityModel activityModel) { this.navigation = navigation; SaveCommand = new Command(Save); if (activityModel != null) { this.activityModel = activityModel; Name = activityModel.Name; Description = activityModel.Description; DueDate = activityModel.Name; Lattitude = activityModel.Lattitude.ToString(); Longitude = activityModel.Longitude.ToString(); Status = activityModel.Completed.ToString(); } }
public ActivityDetailViewModel(INavigation navigation, ActivityModel activityModel) { this.navigation = navigation; if (activityModel != null) { this.activityModel = activityModel; Name = activityModel.Name; Description = activityModel.Description; DueDate = activityModel.Name; Lattitude = activityModel.Lattitude.ToString(); Longitude = activityModel.Longitude.ToString(); Status = activityModel.Completed.ToString(); } EditCommand = new Command(Edit); }