Yes you could apply if you are still outside the country. The only thing is that you will need to have an address where your letter will be sent to as after making an application, there will be an acknowledgemtne letter which will be sent to you after approximately 30 days. Which once you are given the file no. you could change the address online or by sending a letter to the canadian immigration informing them about the change.
I would also advise you write a short covering letter to inform them that you will be residing in u.k from a particular period of time.
Or
If you already have a designated address in the u.k. you could put that address as a prefered address of correspondence. Dont worry as the process will take approx. 40 - 43 months so by then you will have been atleast in u.k. for 6 months. Be ready for police checks from all countries you will have livied in for more than six months before you turned 18 years of age.
Just to remind you if you apply from u.k. make sure that your visa will always be valid and keep on renewing it before it expires as being a foreign and u.k. is not your nationality (ithink so) you will have to have a valid visa. This is contrary to when you apply from your country of origin.
I thought that and hope it makes sense.