The Princess of Wales has been playing with children at a hospice where she has just been named patron.