Simplest way to do this is implement keyword
as a property:
private string _keyword
public string keyword
{
get
{
return _keyword;
}
set
{
_keyword=value;
VoiceSearch();
}
}
Here, _keyword
is what is referred to as a "backing variable". There are interfaces such as INotifyPropertyChanged
which are very commonly used in databinding that are worth looking into, but in your case, the minimum code you have to write is this example.