Ok ListView
개체에 List<Filiale>
이 ItemSource
으로 표시되며 개체 목록이 변경 될 때마다 ItemSource
을 새로 고침하고 싶습니다. 당신의 TextChanged 방법에서 볼 수 있듯이Xamarin 양식 업데이트 listView itemSource
public NearMe()
{
list=jM.ReadData();
listView.ItemsSource = list;
listView.ItemTemplate = new DataTemplate(typeof(FilialeCell));
searchBar = new SearchBar {
Placeholder="Search"
};
searchBar.TextChanged += (sender, e) => {
TextChanged(searchBar.Text);
};
var stack = new StackLayout { Spacing = 0 };
stack.Children.Add (searchBar);
stack.Children.Add (listView);
Content = stack;
}
public void TextChanged(String text){
//DOSOMETHING
list=newList;
}
내가 이전에 새 목록을 할당하지만보기에는 변화가 없습니다 : 목록보기 내가 이런 짓을했는지 지금은 개인화 ItemTemplate
있습니다. 내가 ObservableCollection에에 SetBinding
(사용중인 경우)에서 INotifyPropertyChanged – SoftSan
체크 아웃이 [링크] (http://stackoverflow.com/questions/25364513/can-i-reorder-the-listview-items에서의 ViewModel을 상속 할 수 있습니다 -in-the-run-in-xamarin-forms). –