ying-hui.the@windev.co.uk (47) [Avatar] Offline
#1
Capture.PNG
[ 38 KB ]
something unresolved in the axml
, resulting in "error" squggles inder "local:MvxBind="Text Name" />" etc, image supplied.

FirstViewModel, has been done

public class FirstViewModel : MvxViewModel
{
//string hello = "Hello MvvmCross";
//public string Hello
//{
// get { return hello; }
// set { SetProperty(ref hello, value); }
//}

readonly ITextToSpeech textToSpeech;

public FirstViewModel(ITextToSpeech textToSpeech)
{
this.textToSpeech = textToSpeech;
SayHelloCommand = new MvxCommand(SayHello);
}

public ICommand SayHelloCommand { get; private set; }

void SayHello()
{
textToSpeech.Speak($"Hello {Name}");
}

string name = "";

public string Name
{
get { return name; }
set { SetProperty(ref name, value); }
}
}
Jim Bennett (88) [Avatar] Offline
#2
When you say it does not function, what do you mean exactly? Is it not compiling, not speaking? Send me the code again an I can take a look.

The red squiggles could just be the intellisense getting confused, it does happen some times.
Jim Bennett (88) [Avatar] Offline
#3
Thanks for the code, but can you please explain what doesn't function before I dig into it.