The Duchess of Cambridge visited London's National Portrait Gallery in her role as patron on Wednesday evening.