Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
150904 | Jan 23,2020 07:45 PM UTC | Jan 27,2020 01:03 PM UTC | Xamarin.Forms | 5 |
![]() |
Tags: SfListView |
public class MoznostSerazeni : INotifyPropertyChanged { private string text; private bool serazeno = false; public string Text { get { return text; } set { text = value; } } public bool Serazeno { get { return serazeno; } set { serazeno = value; OnPropertyChanged("Poradi"); } } public event PropertyChangedEventHandler PropertyChanged; public void OnPropertyChanged(string name) { if (this.PropertyChanged != null) { this.PropertyChanged(this, new PropertyChangedEventArgs(name)); } } }
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}
private void Button_Clicked(object sender, EventArgs e)
{
var BC = viewModel.ContactsInfo;
for(int i=0;i<BC.Count-1;i++)
{
if (i % 3 == 0)
BC[i].NewContactNumber = "11111";
}
viewModel.ContactsInfo = new ObservableCollection<Contacts>(BC.OrderBy(i => i.NewContactNumber));
}
}
|
public ObservableCollection<Item> Items
{
get
{
return items;
}
set
{
items = value;
//Parameter should be the same as PropertyName. i.e., Items
this.RaisedOnPropertyChanged("Items");
}
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.