Hmmm I learned it differently. can you give a source?
Sources that claim that Constantine was "converted" to christianity, while he was still on military campaign to become the sole emperor, are not hard to find.
These sources are typically very light on details and essentially point to alleged vision(s) or dream(s) that Constantine had that lead him to convert to Christianity.
There are, however, a variety of problems with believing this conversion story (aside from the fact that Constantine also had a vision where Apollo promised Constantine something like 30 years of rule).
For one, there was no single Christian belief system at the time of the alleged "conversion" vision.
In addition, one might wonder why if converted to "Christianity" did Constantine name a city (Constantinople) after himself (a classic Roman Emperor/Pagan move).
And, why was the city full of pagan symbols and had no "Christian" symbols any the time?
Basically, if one objectively looks at the sources that claim that Constantine was converted to christianity before becoming Emperor, it is pretty clear that this idea comes as a re-writing of history by Christians who wanted (and continue to want) to validate their belief system and cling to the idea that somehow the bible is the word of god as opposed to a document used to highjack early christianity and use it as a mechanism to control people.
It is more likely that Constantine, being a political leader played christians and pagans off each other to get what he wanted... a stable grasp of power over the people of the empire.