To fill cakes, cupcakes or other pastries, you'll need a cream filling that is thick enough so that it won't run or cause baked goods to become soggy. If your cream filling isn't thick enough, a starch thickener will improve its texture without much effort and without altering its delicate flavor. Cornstarch works best for dairy-based fillings, but flour can also be used. However, flour is about half as potent as cornstarch so you'll need to use more, which can affect the flavor of cream fillings. Tapioca starch is best for cream fillings that need to be used immediately, since it thickens rather quickly and at a relatively low temperature. Avoid using arrowroot, which will turn slimy when combined with dairy products.
Prepare your cream filling as you would normally.
Combine the starch thickener of your choice with an equal amount of cold liquid, like water or cream. Stir the mixture thoroughly until a paste forms and there are no more lumps present.
Heat your cream filling in a saucepan over medium-low heat. Whisk in the thickener paste in small amounts until the filling reaches your desired consistency. Stir the cream filling consistently as it heats. Do not overcook the mixture; some thickeners, like flour or arrowroot, can actually make liquids thinner if cooked for too long or at too high a temperature.