Relayout when page is changed.