Following along with this tutorial, watched it several times but can't progress past one small part.
https://www.youtube.com/watch?v=ddmZ...Gqb9DY&index=8
He creates an async function called Tap. It's bound to the TapCommand.
I assume the source generator should link the two together however my code is not working. The add name part it so I've installed the took kit correctly.
MainViewModel.cs
Code:
[RelayCommand]
async Task PList(string s)
{
await Shell.Current.GoToAsync(nameof(PlayerList));
}
MainPage.xmal
Code:
<Border>
<Border.GestureRecognizers>
<TapGestureRecognizer Command="{Binding Source={RelativeSource AncestorType={x:Type viewmodel:MainViewModel}}, Path=PListCommand}"
CommandParameter="{Binding .}">
</TapGestureRecognizer>
</Border.GestureRecognizers>
<Label Text="{Binding .}" Padding="10" Margin="5"></Label>
</Border>
When I right click and 'Go to Definition' on AddCommand here I go to my source generated code. That doesn't apply above.
Code:
<Button
x:Name="addNameBtn"
Text="Add Name"
SemanticProperties.Hint="Testing Add Button"
Command="{Binding AddCommand}"
HorizontalOptions="Fill" />
Any ideas?