private void CharacteristicDataTemplate(DeviceCharacteristicViewModel item, CharacteristicViewHolder holder, int position) { holder.CharacteristicNameLabel.Text = item.Characteristic.Name; holder.CharacteristicUuidLabel.Text = item.Characteristic.Uuid; holder.Permissions.Text = GetCharacteristicPermissionString(item); holder.ClickSurface.SetOnClickCommand(ViewModel.NavigateCharacteristicDetailsCommand, item); }
private string GetCharacteristicPermissionString(DeviceCharacteristicViewModel item) { var str = string.Empty; if (item.Characteristic.CanRead) { str += "r/ "; } if (item.Characteristic.CanWrite) { str += "w/ "; } if (item.Characteristic.CanUpdate) { str += "u/ "; } return(str); }