Esempio n. 1
0
        private bool Filter(ListViewPage.Contact contact)
        {
            // When the text in any filter is changed, contact list is ran through all three filters to make sure
            // they can properly interact with each other (i.e. they can all be applied at the same time).

            return(contact.FirstName.IndexOf(FilterByFirstName.Text, StringComparison.InvariantCultureIgnoreCase) > -1 &&
                   contact.LastName.IndexOf(FilterByLastName.Text, StringComparison.InvariantCultureIgnoreCase) > -1 &&
                   contact.Company.IndexOf(FilterByCompany.Text, StringComparison.InvariantCultureIgnoreCase) > -1);
        }
Esempio n. 2
0
        private void ChangeFirstItemButton_Click(object sender, RoutedEventArgs e)
        {
            var contacts = (ObservableCollection <ListViewPage.Contact>)DataContext;

            contacts[0] = new ListViewPage.Contact("First", "Last", "Line 1\nLine 2");
        }