Added Resize Window feature and added OnResize and OnRender Events