callback for init
resize callback
trial for windows phone 8 and 8.1