protected override void OnSelectedItemsChanged(IEnumerable <Server> newValue) { base.OnSelectedItemsChanged(newValue); interfaceFilterPredicate = (intf) => newValue.Select(item => RelatedInterfacePredicate(item)).Any(pred => pred(intf)); typeLibraryFilterPredicate = (typeLibrary) => newValue.Select(item => RelatedTypeLibraryPredicate(item)).Any(pred => pred(typeLibrary)); InterfaceCollection.Refresh(); TypeLibraryCollection.Refresh(); }
public MasterServerCollection(Browser browser) : base(browser) { InterfaceCollection = new InterfaceCollection(browser, InterfaceFilter); TypeLibraryCollection = new TypeLibraryCollection(browser, TypeLibraryFilter); BindingOperations.SetBinding(InterfaceCollection, InterfaceCollection.ItemsProperty, new Binding("InterfaceCollection.Items") { Source = browser, Mode = BindingMode.OneWay }); BindingOperations.SetBinding(TypeLibraryCollection, TypeLibraryCollection.ItemsProperty, new Binding("TypeLibraryCollection.Items") { Source = browser, Mode = BindingMode.OneWay }); }