private static void TitlePropertyChanged(BindableObject bindable, object oldValue, object newValue) { CardCell cell = (CardCell)bindable; Device.BeginInvokeOnMainThread(() => { cell.TitleLabel.Text = newValue?.ToString(); }); }
private static void SubtitlePropertyChanged(BindableObject bindable, object oldValue, object newValue) { CardCell cell = (CardCell)bindable; Device.BeginInvokeOnMainThread(() => { cell.SubtitleLabel.Text = newValue == null ? string.Empty : newValue.ToString(); if (newValue == null || string.IsNullOrWhiteSpace(newValue.ToString())) { Grid.SetRowSpan(cell.TitleLabel, 2); } else { Grid.SetRowSpan(cell.TitleLabel, 1); } }); }
private static void AttributeCountPropertyChanged(BindableObject bindable, object oldValue, object newValue) { CardCell cell = (CardCell)bindable; Device.BeginInvokeOnMainThread(() => { cell.AttributeCountLabel.Text = newValue.ToString(); if (string.IsNullOrWhiteSpace(newValue.ToString())) { Grid.SetRowSpan(cell.AttributeCountLabel, 2); } else { Grid.SetRowSpan(cell.AttributeCountLabel, 1); } }); }
private static void DateTimePropertyChanged(BindableObject bindable, object oldValue, object newValue) { CardCell cell = (CardCell)bindable; Device.BeginInvokeOnMainThread(() => { //cell.DateTimeLabel.Text = string.IsNullOrWhiteSpace(newValue.ToString()) ? string.Empty : AppResources.CrendentialIssuedLabel + " " + newValue.ToString().Split(' ')[0]; cell.DateTimeLabel.Text = string.IsNullOrWhiteSpace(newValue.ToString()) ? string.Empty : newValue.ToString().Split(' ')[0]; if (string.IsNullOrWhiteSpace(newValue.ToString())) { Grid.SetRowSpan(cell.TitleLabel, 2); } else { Grid.SetRowSpan(cell.TitleLabel, 1); } }); }