0
votes

In new to windows phone development. Can someone help me to learn how can I access a certain control on ViewModel.

Example Scenario: I have a listbox and I want to access the listbox from my View Model to add something. Thanks!

1

1 Answers

3
votes

I think you're approaching this from the wrong angle. You don't want to access the control itself from the ViewModel. Rather, bind the ListBox's ItemsSource to a property on the ViewModel. Then you can add something to the collection directly.