  A framework is introduced for coupling the evolution of galactic magnetic
fields sustained by the mean-field dynamo with the formation and evolution of
galaxies in cold dark matter cosmology. Estimates of the steady-state strength
of the large-scale and turbulent magnetic fields from mean-field and
fluctuation dynamo models are used together with galaxy properties predicted by
semi-analytic models of galaxy formation for a population of spiral galaxies.
We find that the field strength is mostly controlled by the evolving gas
content of the galaxies. Thus, because of the differences in the implementation
of the star formation law, feedback from supernovae and ram-pressure stripping,
each of the galaxy formation models considered predicts a distribution of field
strengths with unique features. The most prominent of them is the difference in
typical magnetic fields strengths obtained for the satellite and central galaxy
populations as well as the typical strength of the large-scale magnetic field
in galaxies of different mass.
