During the appearance, Kate also made it known that fans shouldn’t expect another royal baby after chatting with well-wisher Josh Macpalce in the Yorkshire city.
Josh explained he had sent her and William cards congratulating them on the births of all three of their children, when the Duchess replied: “I don’t think William wants any more."
Josh, 25, who is autistic and has DiGeorge syndrome, caused by the deletion of a small segment of chromosome, held out his arms to the Duchess, who bent down and gave him a hug.
She then said: "Thank you for the hug."
Later on that day the royal couple visited a community centre.
The pair admired the culinary skills of one local woman at the Khidmat Centre.
Footage from the event shows the prince get up close to the cupcakes, which included photos of himself and Kate, and his three children.
"Is that me? Doesn't it look like Charlotte?" Wills asked, before Kate replied: "It looks so much like Charlotte."
When the woman who baked the cupcakes confirmed the photo was indeed William, he added: “Oh my goodness that looks just like Charlotte. It's incredible, I haven't seen that before.
“Very alike in similarity. Well done you that's a lot of hard work. Mary Berry would be very impressed right now. Incredible," he quipped.