In a Windows Phone app, which approach is better?

In a WP application, which approach is better.

  • On the .xaml page, call a method of another class (pass the delegate of the .xaml.cs callback method), which makes some request to the server, receives data and when requests complete calls to the .xaml.cs page method. and in the callback we get the data and bind the data to the control (ListBox).

  • Bind the List box to an ObservableCollection of the MainViewModel class. and change the restricted object from MainViewModel. All server request calls are made in the MainViewModel class.

+3
source share
2 answers

2. (, Databound Windows Phone 7) MainViewModel Listbox ObservableCollection .

MVVC , . ALI , ObservableCollection, , .

+4

, , . :

  • : /
  • ...

WP7, , , : WP7

0

All Articles