WASHINGTON — Michelle Obama has burned off her date-night meals at Washington’s new generation of acclaimed restaurants by pedaling at SoulCycle. President Obama has shopped for Jonathan Franzen novels with his daughters at local independent bookstores. Obama administration staff members, their barhopping chronicled in the gossip pages, have hit the 14th Street hot spots hard.

Decades ago, Washington was broke and run by a mayor best known for smoking crack with a friend on a surveillance tape. Neighborhoods had not fully recovered from the 1968 riots, and an aging Georgetown elite still set the tone. The administrations of two Bushes and a Clinton in between hardly had an effect on the city.

But Mr. Obama’s arrival in 2009 coincided with an urban renaissance. Economic development, federal and private investment, and an influx of highly educated young, gay and diverse professionals gentrified neighborhoods, leading to an explosion in restaurants, bars and cafes. And the Obama family — African-American, youthful, attractive and urbane — were archetypes of a modern city on the upswing.

What the effect on Washington will be when Donald J. Trump moves into the White House is hard to predict. But many Washingtonians fear the worst. Among them is Vincent Gray, the city’s mayor during much of the Obama administration.