I\'ve currently got a piece of Linq that looks something like this ;
List childrenToBeRemoved = this.ItemsSource.Where(o => o.ParentID == \"123
Put you linq expression into a function, and pass in this property as a parameter.