obtain display property using cross-platform safe way