To make the pastry, place the flour, sugar and butter into a food processor and process it until it resembles fine breadcrumbs. Slowly add the iced water and mix until a smooth dough forms. If using a Thermomix: To make the pastry in the Thermomix, place the flour, sugar and butter into the bowl and mix for 10 seconds on Speed 6 (or until it resembles fine breadcrumbs). Add the iced water and knead for 2 minutes on Interval speed. Knead the dough into a ball on a lightly floured surface.
Wrap in plastic wrap and place it into the fridge for a minimum of 30 minutes. If using store-bought pastry sheets, place them onto the bench to defrost. Preheat oven to 180 degrees celsius fan forced. Grease a 24cm pie dish and set aside.
Strain the apricot syrup from the tinned apricots (reserving 1 cup for use in the pie filling). Discard the remaining apricot syrup.
Meanwhile, place the apricot syrup (1 cup), raw sugar, lemon juice and cinnamon into a saucepan. Bring to a simmer while stirring until the sugar has dissolved (approximately 2 minutes).
Add the apricots and stir to combine. Stir through the dissolved cornflour and cook for 1-2 minutes or until the cornflour has thickened the juices. Set aside to cool. Divide dough into 2 portions (⅔ for the base and ⅓ for the top) and then roll out each portion until 3-5mm thick.
Place the larger piece of pastry over the pie dish and press down so that it covers the base and sides. Trim any excess.
Add the apricot mixture to the pie dish and spread out evenly.
Place the smaller piece of pastry over the fruit, and crimp the edges lightly with your fingertips to seal around the rim of the dish.
Brush the lightly beaten egg over the top of the pie. Sprinkle over the raw sugar (optional).
Cut 3-4 slits (or cut out a shape) into the top of the pastry - this allows the steam to escape.
Bake in the oven for 30-40 minutes or until the pie pastry is lightly golden and crispy.