Added ToPage method to XLayers class