After you've been discharged, then you may be able to get a mortgage if you've got a good deposit. Otherwise, wait until bankruptcy drops off your credit file, which is 6 years after your court date.
Visit the expert section on our sister sife iva.co.uk, there is a mortgage broker on there that may be able to offer some advice.