public DisasterListItemViewModel(CommitmentDto dto) { _id = dto.Disaster.Id; _disasterName = dto.Disaster.Name; _disasterStatusAndDate = string.Format("{0} - until {1}", Enum.GetName(typeof(CommitmentStatus), dto.Status), dto.EndDate.ToString("MMMM dd, yyyy")); CommitmentData = new CommitmentViewModel { Id = dto.Id, PersonId = dto.PersonId, StartDate = dto.StartDate, EndDate = dto.EndDate, DisasterId = dto.Disaster.Id, Status = dto.Status }; }
public CommitmentPage(CommitmentViewModel commitment) { _commitment = commitment; BackgroundColor = Constants.HtBoxDarkBrown; BindingContext = commitment; var grid = new Grid() { RowDefinitions = new RowDefinitionCollection { new RowDefinition(), new RowDefinition(), }, ColumnDefinitions = new ColumnDefinitionCollection { new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) }, new ColumnDefinition { Width = new GridLength(2, GridUnitType.Star) }, } }; var plannedLabel = new Label { Text = "I am", TextColor = Constants.HtBoxTan, BackgroundColor = Constants.HtBoxDarkBrown }; plannedLabel.SetValue(Grid.RowProperty, 0); var plannedTextCell = new TextCell { }; plannedTextCell.SetBinding(TextCell.TextProperty, "Status"); grid.Children.Add(plannedLabel); Content = grid; }
public CommitmentViewEventArgs(string segueName, CommitmentViewModel viewModel) { SegueName = segueName; ViewModel = viewModel; }