Xavier took a total of 10 pages of notes during 2 hours of class. After attending 4 hours of class, how many total pages of notes will Xavier have in his notebook? Assume the relationship is directly proportional.

Since Xavier took 10 pages of notes during 2 hours, this means his rate of taking notes is 10/2 = <<10/2=5>>5 pages per hour.

If this rate is constant, then after 4 hours, Xavier will have taken a total of 4*5 = <<4*5=20>>20 pages of notes. Answer: \boxed{20}.