The TextChange call command does not update the text source immediately


I am using MVVM light in my windows phone 8.1 here is code


    <TextBox Text="{Binding SearchText, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" >
            <Core:EventTriggerBehavior EventName="TextChanged">
                <Core:InvokeCommandAction Command="{Binding SearchTextChanged}"></Core:InvokeCommandAction>

here is my VM

    private RelayCommand _searchTextChanged;

    /// <summary>
    /// Gets the SearchTextChanged.
    /// </summary>
    public RelayCommand SearchTextChanged
            return _searchTextChanged
                ?? (_searchTextChanged = new RelayCommand(
                                      () =>


each time text is changed SearchTextChanged command is firing properly but the text in SearchText property is not updated it is one character less. e.g. if text in textbox is A than SearchText contains null. If text in textbox is 'aaa' than text in SearchText is only 'aa' the last character is always missing.

Any Ideas?

OK, so based on the comments, here's the answer - don't use the InvokeCommandAction but the two-way binding.

<TextBox Text="{Binding SearchText, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />

In the viewmodel behind this, there's a property called SearchText which has a setter that can call the LoadContents method, something like this...

public string SearchText
    get { return this.searchText; }
        this.searchText = value;

Every time the string in the TextBox changes, the setter is invoked and so is the LoadContents method.