Implement resize handling through resize callback.