private async Task GoToAddWeightPageAsync() { var viewModel = new WeightAddViewModel(_connection, NavigationService); var medicationsMainPage = new WeightAddPage { BindingContext = viewModel, }; await NavigationService.NavigateAsync(medicationsMainPage); }
private async Task HandleTaskSelectedAsync(ActionPlanTaskInstanceV2 task) { if (task.TrackingPolicy.IsAutoTrackable == true) { var xpath = task.TrackingPolicy.TargetEvents.FirstOrDefault().ElementXPath; if (xpath.Contains("thing/data-xml/weight")) { var weightAddPage = new WeightAddPage { BindingContext = new WeightAddViewModel(_connection, NavigationService), }; await NavigationService.NavigateAsync(weightAddPage); } } }