Prince William, Princess Kate Inspect Steam Train Above Lake in Canada

William and Kate and their children are on an eight-day tour of Canada.

— -- Prince William and Princess Kate surprised onlookers Wednesday when they walked on a railroad bridge perched high above the icy waters of Canada’s Lake Bennett.

William and Kate, both 34, made the impromptu visit to the White Pass steam train in Carcross, Yukon, on the fifth day of their royal tour of Canada after learning that William’s grandparents, Queen Elizabeth II and Prince Philip, rode a steam train during one of their visits to Canada.

Photos show William and Kate, wearing boots and a grey cardigan, sidestepping along the tracks above the water, holding onto the train for support. The couple blew the train’s steam whistle before returning to the rest of their day's engagements.

The train visit was the second time Wednesday that William was touched by a memory of his family in Canada. While in Whitehorse, William was introduced to a 90-year-old man who said he met William’s late mother, Princess Diana, when she visited the area in the 1980s.

“I asked your father if he'd been to Yukon and he said no, and I said we ought to do something about that so I called the governor general and we made arrangements,” the man told William. “Then I got a call saying, 'They can't go, the princess is pregnant.’”

"Wow, that must have been me, or Harry,” said a surprised William.

The royal couple also enjoyed a laugh Wednesday when they joined children at the MacBride Museum of Yukon History in Whitehorse for story time on a log bench.

William and Kate both burst out laughing upon learning the book’s main character was named “William the Moose.”

Kate wore a striking Carolina Herrera coat for the couple's day exploring the picturesque towns of Whitehorse and Carcross in the Yukon. The coat marked the third day Kate has worn crimson, in a nod to her Canadian hosts.

William and Kate are spending their time out of the spotlight on their tour of Canada with their children, Prince George, 3, and Princess Charlotte, 16 months. George, Charlotte and their nanny, Maria Teresa Borrallo, managed to make a secret visit to a local petting zoo Wednesday.

Prince George and Princess Charlotte will have their time in the spotlight today as they join their parents at a children’s party for military families at Government House in Victoria, British Columbia. The party will mark the first time George and Charlotte have appeared at an official royal event since the family’s arrival in Canada last Saturday.

William, Kate, Charlotte and George are scheduled to depart Canada for the U.K. on Saturday.