I want to invoke a command on TextChange event of new windows phone 8.1 AutoCompleteBox Control. I am using MVVM Light.
相关问题
- WP8.1 How to cancel a Background Audio Task in C#
- windows phone 8.1 music library get current media
- Listview applies a check to other listview items h
- ObservableCollection in ViewModel is not updated w
- Is it possible to send a List<Object> in MVV
相关文章
- Show flyout using BottomAppBar
- Best way to implement MVVM bindings (View <-> V
- Using LiveData to set visibility of TextView
- app:visibleGone cannot resolve on android Databind
- PowerShell Pass Named parameters to ArgumentList
- Adb install progress bar
- Bash Centos7 “which” command
- Webkit transition not working on chrome with windo
In new windows store 8.1 apps there is a new SDK Behavior SDK for adding behaviors in the application. it is not added by default you have to add this Extension in your project. below is how to add this extension in your project.
install the Behavior SDK from the list.
Now in your XAML page add following namespaces to InvokeActionCommand that is capable of invoking ICommand on ViewModel
...
here is the code XAML code for invoking command on textchange event of the autocompletebox.
Following is my RelayCommand in ViewModel
Hope this helps for detail see the following link. Windows 8.1 Behavior SDK: How to use InvokeAction
The marked answer is certainly correct and it helped me to discover the Behavior SDK; however, the Behavior SDK seems to already be installed natively in VS 2015 CTP, rather than being an extension. Furthermore, for a Universal app to use the Behavior SDK you must:
The XAML namespaces that you must define are still the same: