private void OnAttributeSelected(object sender, SelectedItemChangedEventArgs e) { SystemStatusAttribute attribute = ((ListView)sender).SelectedItem as SystemStatusAttribute; if (attribute != null) { DisplayAlert(attribute.Name, $"{attribute.Value} ({attribute.Level})", "OK"); } ((ListView)sender).SelectedItem = null; }
private static SystemStatusAttributeModel ToSystemStatusAttributeModel(this SystemStatusAttribute attribute) { if (attribute == null) { return(null); } return(new SystemStatusAttributeModel() { Level = attribute.Level, Name = attribute.Name, Value = attribute.Value }); }