There is a ListBox and TextBox , the first one is bound to ObservableCollection<Adress> , where Adress is
public struct Adress { public Adress(string text, double x, double y) { Text = text; X = x; Y = y; } public string Text { get; set; }//Именно это свойство отображается в "ListboxItem" public double X { get; set; } public double Y { get; set; } } TextBox bound to a property-string, in the setter of which I tried to filter, but all is in vain. I tried ICollectionView with the help of ICollectionView , but did not figure out how to achieve the desired result.
And now about what the desired result is - when entering text into a TextBox , those elements in ListBox 'e that contain this text (regardless of case) - remain visible, and the rest are “hidden” (I think just to use Visibility.Collapsed , but here all means will be good). Here I can not understand how to implement it without violating the principles of MVVM.