public DetailSamplePageViewModel(INavigation navigationService, Saample currentSample) { NavigationService = navigationService; //Garder le sample en mémoire -> currentSample CurrentSample = currentSample; PlayMP3Command = new Command(PlayMP3CommandExecute); PlayTTSCommand = new Command(PlayTTSCommandExecute); ShareCommand = new Command(ShareCommandExecute); MyTitre = $"Personnage sélectionné : { currentSample.Character}"; }
public DetailSamplePage(Saample currentSample) { InitializeComponent(); BindingContext = new DetailSamplePageViewModel(Navigation, currentSample); }