There are various lengths involved when purchasing your fly rod. Keep in mind that these types of rods are much much longer than your traditional fishing poles because they are designed to cast the line (relatively) long distances while at the same time delicately landing a tiny dry fly on the water so smoothly and gracefully so as not spook the fish.
At first brush that doesn't sound like much until you realize that unlike typical bait or lure fishing all of the weight for casting is built into the fly line itself, and because of the forces of gravity you need a long rod to get that line in motion.
So let's go back to the original question at hand: What is the proper length of a fly rod.
And the answer to that is: it depends! Since you are interested in fishing for trout that tremendously limits your options and we will narrow your options down based on that. So you can forgot about the double grip or spey rods for chucking heavy streamers out on salt water.
First it depends on where you plan to go trout fishing and how much distance you need with your casts, I am going to make the broad assumption that you will be hitting local rivers and streams and may occassionaly go to a lake where longer distances are needed. 
This probably describes most trout fly fishermen (and women).
You really do not need much if you plan on fishing very small and brushy creeks (which can be a major hassle but rewarding since they are harder to get into and away from all the other folks) then you will need to go with a smaller rod in the 7 foot 6 inch range because you just won't have any room to maneuver a larger pole around.
But, but, but. A 7 foot 6 inch fly rod is on the small end and will limit you to fishing small water with short casts. And I mean short, when coupled up with a 3 or 4 weight fly line you can expect about a 30 foot cast with any amount of delicacy and precision.
You can try muscling up and casting long distances and with a good haul and shooting some line throw it out there but its much harder with a short pole and light weight line.
So choose wisely if you only want to spend money on one rod.
Frankly if you are going to get serious about fly fishing and fishing different rivers and lakes you will want at least a couple of rods. A nice nine foot with a minimum 5 weight forward line for hitting those long distance casts with heavy streamers and a smaller medium action rod with a 3 or 4 weight double taper line  that can gracefully roll cast those delicate tippets and micro size 18 flies.
Also keep in mind there are breakdown considerations when choosing your trout fishing rod, or any fly rod for that matter.
Typically most fly rods break down into two or four pieces and from time to time you will see some models in three or six pieces for those wanting an ultra portable rod that packs away easily.
One guy I know straps his six piece onto the back of his motorcycle. With a two piece that wouldn't be possible.
If space is a premium you may want to get a four or possibly a six piece travel style rod.
Although my preference is always a two piece since it makes for putting the rod together easier and that much easier to keep each rod section in proper alignment.
As you fish throughout the day the rod sections can twist and come out of alignment or even come apart although that rarely happens if you fit the ferrules together snugly when assembled. The importance of this is a slight twist in the rod sections will cause the fly line to drag against the blank causing friction and messing up your casts.