I've got 2 controls on a page, one for a request date and another for the date of birth of a client. Both of these values come from a SQL Server database. During the Page_Loaded event I had been trying to calculate the age of the client on the request date, however that's not working. For some reason, which I don't understand, the date of birth of the client is wrong (it turns out to be today's date), during the Page_Loaded event. However, once the page is actually displayed, it is correct. I had thought Page_Loaded would have been the correct event to put this code, but that doesn't seem to be the case.
So, where should I put the age calculation code? In what event?
The XAML for the first control is:
and the XAML for the second control is here: