Я настроил управление < /p>
public partial class PatientBar : ContentView
{
public ICommand PatientBarTapCommand { get; private set; }
public PatientBar()
{
InitializeComponent();
PatientBarTapCommand = new Command(async () =>
{
await ExecutePatientBarTapCommand();
});
}
private static async Task ExecutePatientBarTapCommand()
{
await Shell.Current.DisplayAlert("", "PatientBarTap", "ok");
}
public static readonly BindableProperty PatientNameProperty =
BindableProperty.Create(nameof(PatientName), typeof(string), typeof(PatientBar));
public string PatientName
{
get => (string)GetValue(PatientNameProperty);
set => SetValue(PatientNameProperty, value);
}
public static readonly BindableProperty PatientProperty =
BindableProperty.Create(nameof(Patient), typeof(MPatient), typeof(PatientBar));
public MPatient Patient
{
get => (MPatient)GetValue(PatientProperty);
set => SetValue(PatientProperty, value);
}
}
< /code>
Я думаю, что усовершенствовал весь код, но нажатие на команду все еще не работает. Я не знаю, в чем заключается проблема. Вы можете помочь мне указать на проблему? Большое спасибо
Подробнее здесь: https://stackoverflow.com/questions/796 ... m-controls