Donald Trump bashed China throughout the 2016 campaign. President Trump has bashed China ever since he moved into the White House.

So how did the Chinese respond on his first visit to the communist nation? They invited him to a state dinner in the Forbidden City, making him the first foreign leader to dine in the ancient royal enclave since the founding of modern China.

Guess talking tough works.

Trump and first lady Melania landed in the Chinese capital of Beijing on Wednesday. They were greeted in an elaborate welcome ceremony and after meetings with top officials, joined President Xi Jinping and his wife, Peng Liyuan, for a tour of the Forbidden City. The leaders, joined by U.S. and Chinese officials, then dined in a palace that housed Chinese emperors for almost 500 years and enjoyed a dance and music performance.

Dining in the Forbidden City is an honor that will move Trump, a historian told CNN.

"The Chinese government know who they're dealing with," said Beijing-based historian Jeremiah Jenne. "It's another in a long line of fairly shrewd moves by the Chinese government and something [Trump is] going to be very impressed with."

Ming Wang, a professor of government and politics at George Mason University, said the Chinese "will give Trump an exceptional reception, essentially they'll try to make Trump happy -- that will work to China's advantage." ...

"(Xi's) going to treat Trump almost like an emperor," said Ming.

Using the Forbidden City in this manner is a dramatic shift from how the palace was viewed in the early decades of the People's Republic, the successor to the revolutionary government which overthrew the Qing Empire.

"What was once known as the 'palace of blood and tears' is now being used for a state visit," Jenne said. "This is an example of how the narrative (within China) has shifted, particularly in the last 25 years, it's no longer about emphasizing class revolution, in recent years it's been much greater emphasis on the glories of Chinese civilization."

The Chinese are known for "rolling" U.S. presidents, parading them around in embarrassing ways. But not so for Trump. Just another example of making America great again.