Hi
Using ListView Behaviors, How do I get values/object of selected item or selected row?
Below is what i tried and I get a property that says "SelectedItem" but i cant access it. What am I missing?
<ListView.Behaviors>
<behaviors:EventHandlerBehavior EventName="ItemSelected">
<behaviors:InvokeCommandAction Command="{Binding OnItemSelected}" /> </behaviors:EventHandlerBehavior> </ListView.Behaviors>
//constructor
public BurialsViewModel()
{
_onItemSelected = new Command(OnSelectedItem);
}
//ViewModel
ICommand _onItemSelected;
public ICommand OnItemSelected{ get { return _onItemSelected; } }
void OnSelectedItem(object sender) { //I need values from sender }